c++/10682: [3.3/3.4 regression] chokes on a typedef for an enum inside a class template
bangerth@dealii.org
bangerth@dealii.org
Thu May 8 15:48:00 GMT 2003
Old Synopsis: gcc 3.3 chokes on a typedef for an enum, both inside a class template
New Synopsis: [3.3/3.4 regression] chokes on a typedef for an enum inside a class template
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu May 8 15:43:03 2003
State-Changed-Why:
Confirmed, a regression from 3.2:
-------------------------------
template<typename T>
struct Foo {
enum E {a,b,c};
typedef E EE;
};
void baz(Foo<int>::EE x);
--------------------------
g/x> /home/bangerth/bin/gcc-3.2.3-pre/bin/c++ -c z.cc
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c z.cc
z.cc:7: error: `EE' is not a member of type `Foo<int>'
z.cc:7: error: parse error before `)' token
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c z.cc
z.cc:7: error: variable or field `baz' declared void
z.cc:7: error: `EE' is not a member of `struct Foo<int>'
The whole thing works if we do
typedef int EE;
instead, so this is really a bug.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10682
More information about the Gcc-bugs
mailing list