c++/10682: gcc 3.3 chokes on a typedef for an enum, both inside a class template

meinlschmidt@informatik.uni-erlangen.de meinlschmidt@informatik.uni-erlangen.de
Thu May 8 15:06:00 GMT 2003


>Number:         10682
>Category:       c++
>Synopsis:       gcc 3.3 chokes on a typedef for an enum, both inside a class template
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu May 08 14:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Meinlschmidt
>Release:        gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux)
>Organization:
>Environment:
Intel clone,
Linux, SuSE 8.2 distro out-of-the-box
>Description:
#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>'
};
>How-To-Repeat:
gcc -DCLUNK hitTheBug.C
>Fix:
omit -DCLUNK :-)
or use gcc (GCC) 3.2.2
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list