Article View: gnu.g++.bug
Article #1333enum bug
From: Richard W. Kreutzer
Date: Tue, 05 Jan 1993 23:48
Date: Tue, 05 Jan 1993 23:48
15 lines
738 bytes
738 bytes
The following code won't compile with gcc-2.3.2 under SunOS 4.1.1:
class foo {
enum {d, e, f=e+2};
};
$ gcc -c bug.cc
bug.cc:2: `e' undeclared, outside of functions
bug.cc:2: enumerator value for `f' not integer constant
It works if the enum is global. Shouldn't it also work in class scope?
Is there a work-around?
Regards,
Dick
Technical Details
Message-ID:
<9301052348.AA04241@integra-yp>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!integra.UUCP!rwkShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!integra.UUCP!rwk From: rwk@integra.UUCP (Richard W. Kreutzer) Subject: enum bug Message-ID: <9301052348.AA04241@integra-yp> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 5 Jan 1993 23:48:34 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 16