This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18976] New: [3.4 Regression] can't pass anonymous enum to function template
- From: "joerg dot richter at pdv-fs dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Dec 2004 09:16:16 -0000
- Subject: [Bug c++/18976] New: [3.4 Regression] can't pass anonymous enum to function template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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