gcc 3.4.4: stl's uninitialized bug

Iván Nieto doamud@gmail.com
Fri Dec 2 19:29:00 GMT 2005


Building a Cygwin project of mine with gcc 3.4.* issues some warnings
I haven't been able to eliminate completely. I'm using gcc 3.4.4 with
Cygwin 1.5.18, under Windows 98SE.

I've reduce the problem to this test case:


#include <list>
class Foo {
public:
    Foo();
    Foo(const Foo& f);
    ~Foo();
};
void function() {
    std::list<Foo> deleted;
    deleted.push_back(Foo());
}


Compiling with:
g++ -c -O2 -Wall -Werror foo.cpp


Note that if -O2 is removed or replaced by -O, it doesn't issue a warning.
Also, commenting out Foo's copy constructor, "solves" the problem.

--
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/



More information about the Cygwin mailing list