home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.g++.bug
- Path: sparky!uunet!cis.ohio-state.edu!mmm.COM!kjhopps
- From: kjhopps@mmm.COM (Kevin J Hopps)
- Subject: g++ bug
- Message-ID: <9211202242.AA24128@diac.mmm.com>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Fri, 20 Nov 1992 22:42:35 GMT
- Approved: bug-g++@prep.ai.mit.edu
- Lines: 37
-
- I just finished installing g++ and libg++ on a "sparc-sun-sunos4.1", and I
- think I have discovered a bug.
-
- The example on the top of page 114 of the C++ ARM does not work inside a
- class. The enum in class "test" gives errors (see below), but the enum in
- main works fine.
- =======================> bug.cc <=======================
- class test
- {
- enum { d, e, f=e+2 };
- };
-
- int main()
- {
- enum { d, e, f=e+2 };
- }
- =======================> end source <=======================
-
- =======================> command & output <=======================
- % g++ -v bug.cc
- Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/specs
- gcc version 2.3.1
- /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix bug.cc /usr/tmp/cca06608.i
- GNU CPP version 2.3.1 (sparc)
- /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/cc1plus /usr/tmp/cca06608.i -quiet -dumpbase bug.cc -version -o /usr/tmp/cca06608.s
- GNU C++ version 2.3.1 (sparc) compiled by GNU C version 2.3.1.
- bug.cc:3: `e' undeclared, outside of functions
- bug.cc:3: enumerator value for `f' not integer constant
- =======================> end command & output <=======================
-
- Thank you.
- --
- Kevin J. Hopps e-mail: kjhopps@mmm.com
- 3M Company phone: (612) 737-3300
- 3M Center, Bldg. 235-3B-16 fax: (612) 737-2700
- St. Paul, MN 55144-1000
-
-