The invalid code (missing '{' in second line) template <class T> class A{ template <class T1> void B() (static_cast<void> (0)); } };
creates an ICE with gcc-4.1.2: crash.cc:2: internal compiler error: in grokfield, at cp/decl2.c:896 -- Summary: ICE on invalid code Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: axel-freyn at gmx dot de GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31026