The following valid code snippet is rejected since GCC 3.4.0: ===================================================== template<typename> struct A { typedef int T; T foo();
A() { foo().~T(); } }; A<int> a; ===================================================== The error message is: bug.cc: In constructor 'A< <template-parameter-1-1> >::A()': bug.cc:6: error: expected class-name before '(' token The code compiles if A is a non-template class, or if I remove the typedef and call the anonymous template parameter "T" instead. -- Summary: [4.1/4.2/4.3 regression] Pseudo-dtor in template class rejected Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: rejects-valid, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32384