bug.cc: /////////////////////////// enum { FOO } foo; template<class T> void bar( T const& t ) {}
void test() { bar( foo ); } /////////////////////////// $ ~/gcc/3.4.2/bin/g++ -o /dev/null -c bug.cc bug.cc: In function `void test()': bug.cc:10: Fehler: no matching function for call to `bar(<anonymous enum>&)' Works with GCC 3.3.3 Fix: give the enum a name -- Summary: [3.4 Regression] can't pass anonymous enum to function template Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: joerg dot richter at pdv-fs dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18976