The following invalid code snippet causes a strange error message: =================================== template<int> struct A { ::A~(); }; ===================================
bug.cc:3: error: using-declaration for non-member at class scope ^^^^^^^^^^^^^^^^^ bug.cc:3: error: expected ';' before '~' token This was introduced in gcc 3.4.0. With gcc 3.3.5 I get bug.cc:3: error: invalid use of template-name 'A' in a declarator bug.cc:3: error: syntax error before `~' token which makes more sense. -- Summary: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698