This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BUG REPORT: Cygwin, g++, -O2, static member function, std::string


Brad Bell wrote:

I seem to have run across a bug using g++ with -O2 under Cygwin. It has to do with using static class member functions and standard string.


The bash shell script command
./bug.sh
creates three files, compiles, links, and runs the result. I have run this command on several Cygwin systems and gotten results similar to those in bug_cygwin.out; i.e., the assert
assertion r != 0 failed
I have run the same command on several Linux systems and gotten results similar to those in bug_linux.out; i.e., no assertion.



Can you post the bug{1,2}.cpp files? I would guess that its not a bug, but rather you are relying on an undefined order of static initialization that happens to do what you want sometimes but not others. It's impossible to say for sure without seeing the source files, though.


-Lewis


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]