home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / g / bug / 2081 < prev    next >
Encoding:
Text File  |  1992-12-27  |  1.2 KB  |  51 lines

  1. Path: sparky!uunet!crdgw1!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bingsuns.cc.binghamton.edu!umrigar
  2. From: umrigar@bingsuns.cc.binghamton.edu (Zerksis D. Umrigar)
  3. Newsgroups: gnu.g++.bug
  4. Subject: g++ bug
  5. Message-ID: <9212272041.AA23580@bingsuns.cc.binghamton.edu_>
  6. Date: 27 Dec 92 20:41:17 GMT
  7. Sender: gnulists@ai.mit.edu
  8. Distribution: gnu
  9. Organization: GNUs Not Usenet
  10. Lines: 38
  11. Approved: bug-g++@prep.ai.mit.edu
  12.  
  13. /*
  14.  
  15. The following fails to compile under a unmodified gcc 2.3.2
  16. (mips-dec-ultrix4.2).  It compiles if the marked (enum) line below is
  17. removed and the values for N and D directly substituted in the return
  18. expression for f.  The compilation log is shown after the program.
  19.  
  20.  
  21. */
  22.  
  23. class X {
  24.   class S {
  25.     int m;
  26.   public:
  27.     S(int i) : m(i) { }
  28.     int f(void) {
  29.       enum {N= 8, D= 10 };    //Problem.
  30.       return (m*N)/D;
  31.     }
  32.   };
  33.   S s;
  34. public:
  35.   X(int i) : s(i) { }
  36.   int f(void) { return s.f(); }
  37. };
  38.  
  39. /* COMPILATION LOG.
  40.  
  41. gcc -c t2.cc
  42. t2.cc: In method `int  S::f ()':
  43. t2.cc:17: Internal compiler error 12.
  44. t2.cc:17: Please report this to `bug-g++@prep.ai.mit.edu'.
  45.  
  46. Compilation exited abnormally with code 1 at Sun Dec 27 15:25:33
  47.  
  48. -zerksis umrigar (umrigar@bingsuns.cc.binghamton.edu).
  49.  
  50. */
  51.