#ifdef CLUNK template<typename T> #endif class Foo { public: enum xyzzy {a,b,c}; typedef xyzzy Xyzzy; }; class Bar { void baz(Foo #ifdef CLUNK <int> #endif ::Xyzzy x); // error: `Xyzzy' is not a member of type `Foo<int>' }; Release: gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Environment: Intel clone, Linux, SuSE 8.2 distro out-of-the-box How-To-Repeat: gcc -DCLUNK hitTheBug.C
Fix: omit -DCLUNK :-) or use gcc (GCC) 3.2.2
State-Changed-From-To: open->analyzed 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.
Responsible-Changed-From-To: unassigned->jason Responsible-Changed-Why: got it
Responsible-Changed-From-To: jason->lerdsuwa Responsible-Changed-Why: you broke it
Fixed in 3.3 branch and trunk.