This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/18976] New: [3.4 Regression] can't pass anonymous enum to function template


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]