------- Comment #10 from dougsemler at gmail dot com 2010-05-10 17:18 ------- Well, is it really invalid code with -std=c++0x?
The virutal destructor seems to be causing the issue. With gcc 4.4.3 (after changing virtual ~base() to virtual void func()): $ g++ gcc_bug.cc gcc_bug.cc: In function âint main()â: gcc_bug.cc:9: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x $ g++ gcc_bug.cc -std=c++0x $ So you can see that g++ sees this as valid code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44045