Hi, g++ crashes and asks me to submit a bug on the following program fragment: The command is: g++-3.2 -c -Wreturn-type -pedantic -pedantic-errors -Wundef testing.cpp -o testing.o The OS: Linux 2.4.26.1.p4 #1 i686 (and also on 2.4.21.4) The code (file testing.cpp) is: #include <vector> #include <iostream> template< class D > class union_find; template< class D > class union_find<D> :: index; template< class D > std::ostream& operator << ( std::ostream& , const union_find< D > & ); int main( unsigned int nrarguments, char arguments [] ) { std::cout << "have a nice day without crashes!\n"; }
Fixed already in 3.2.3. Confirmed in 3.2.2. Also this is invalid code but only rejected in 3.4.0 and above.