I'm seeing hundreds of warnings like this on a project that uses the idiom of self-registering objects. It only happens if the constructor is a template. This is a regression wrt previous gcc releases. // Test case begins class B { public: B(); // Implemented elsewhere }; class A { public: template <typename T1> A(T1) { new B; } }; A a(10); // Test case ends t:/sec/exp # g++ -c -Wall p.cpp p.cpp: In constructor `A::A(T1)': p.cpp:11: warning: statement has no effect
This is a dup of bug 15083. *** This bug has been marked as a duplicate of 15083 ***