home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / g / bug / 1852 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.7 KB  |  50 lines

  1. Newsgroups: gnu.g++.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!mmm.COM!kjhopps
  3. From: kjhopps@mmm.COM (Kevin J Hopps)
  4. Subject: g++ bug
  5. Message-ID: <9211202242.AA24128@diac.mmm.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Fri, 20 Nov 1992 22:42:35 GMT
  10. Approved: bug-g++@prep.ai.mit.edu
  11. Lines: 37
  12.  
  13. I just finished installing g++ and libg++ on a "sparc-sun-sunos4.1", and I
  14. think I have discovered a bug.
  15.  
  16. The example on the top of page 114 of the C++ ARM does not work inside a
  17. class.  The enum in class "test" gives errors (see below), but the enum in
  18. main works fine.
  19. =======================> bug.cc <=======================
  20. class test
  21. {
  22.     enum { d, e, f=e+2 };
  23. };
  24.  
  25. int main()
  26. {
  27.     enum { d, e, f=e+2 };
  28. }
  29. =======================> end source <=======================
  30.  
  31. =======================> command & output <=======================
  32. % g++ -v bug.cc
  33. Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/specs
  34. gcc version 2.3.1
  35.  /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
  36. GNU CPP version 2.3.1 (sparc)
  37.  /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
  38. GNU C++ version 2.3.1 (sparc) compiled by GNU C version 2.3.1.
  39. bug.cc:3: `e' undeclared, outside of functions
  40. bug.cc:3: enumerator value for `f' not integer constant
  41. =======================> end command & output <=======================
  42.  
  43. Thank you.
  44. -- 
  45. Kevin J. Hopps            e-mail:    kjhopps@mmm.com
  46. 3M Company            phone:    (612) 737-3300
  47. 3M Center, Bldg. 235-3B-16    fax:    (612) 737-2700
  48. St. Paul, MN 55144-1000
  49.  
  50.