15227 – [3.3/3.4/4.0 regression] Trouble with invalid function definition (original) (raw)

Description Volker Reichelt 2004-04-30 14:49:11 UTC

The following testcase (which is invalid, as A::B doesn't exist) causes trouble:

============================================= template struct A {};

template void A::B::foo() {}

GCC 2.95.3 correctly rejects the code, gcc 3.1 - 3.3.4 wrongly accept it, gcc 3.0.x, 3.4.0 and mainline segfault.

Comment 1 Drea Pinski 2004-04-30 15:00:05 UTC

Confirmed. Note 3.0.4 ICE after an error message (the same as 2.95.3): tin:/src/gnu/gcctest>/ia32_linux_gcc3_0/bin/gcc pr15227.cc pr15227.cc:3: syntax error before `::' token pr15227.cc:3: confused by earlier errors, bailing out