Possible bug with enum i486-pc-linux-gnulibc1 egcs-2.91.52
Stefan Meixner
Stefan.Meixner@emskopp.a.shuttle.de
Fri Jul 31 02:36:00 GMT 1998
Hi,
I'm not absolutely sure, if the code is
vaild. I checked the draft standard, but was so far
not able to clarify the issue. But I think this is a bug:
CODE:
--------------
// if compiled with -D_OK complies fine
template <typename _A>
class B
{
public:
B() { }
#ifdef _OK
enum { M = _A::M , N = _A::N };
#else
enum { M = _A::C::M , N = _A::C::N };
#endif
};
class C
{
public:
enum { M = 10 , N = 20 };
};
class A : public C
{
public:
};
int main()
{
B<A> test;
}
--------------
MESSAGE:
--------------
g++ -c testenum2.cc
testenum2.cc:12: parse error before `::'
testenum2.cc:12: missing ';' before right brace
testenum2.cc:14: parse error before `}'
--------------
I checked with
g++ -v
Reading specs from /usr/lib/gcc-lib/i486-pc-linux-gnulibc1/egcs-2.91.52/specs
gcc version egcs-2.91.52 19980727 (gcc2 ss-980609 experimental)
and also with previous snapshots I have still available.
Stefan
More information about the Gcc-bugs
mailing list