home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / g / bug / 2309 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.2 KB  |  51 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!mtl.mit.edu!fritz
  2. From: fritz@mtl.mit.edu
  3. Newsgroups: gnu.g++.bug
  4. Subject: Internal compiler error 346.
  5. Date: 21 Jan 1993 18:25:47 -0500
  6. Organization: MIT Microsystems Technology Laboratories
  7. Lines: 37
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-g++@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301210625.AA22817@wayne>
  12. Reply-To: fritz@mtl.mit.edu
  13.  
  14. This is to report a bug with destructors of nested classes.
  15.  
  16. We run gcc on two platforms:
  17.   Reading specs from /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
  18.   gcc version 2.3.3
  19.   Reading specs from /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix4.2/2.3.3/specs
  20.   gcc version 2.3.3
  21.  
  22. Here's the problem:
  23.  
  24.   g++ doesn't like destructors of nested classes defined outside the
  25.   class definition.  Code below gives:
  26.  
  27.     % g++ bugnest.cc
  28.     bugnest.cc:8: Internal compiler error 346.
  29.     bugnest.cc:8: Please report this to `bug-g++@prep.ai.mit.edu'.
  30.  
  31.   No problem if the destructor is declared as an inline inside the class
  32.   definition.
  33.  
  34. Here's the code:
  35.  
  36.     class S {
  37.       struct R {
  38.         R() {}
  39.         ~R();
  40.       };
  41.     };
  42.  
  43.     S :: R :: ~R() {}
  44.  
  45. Thanks, 
  46.     - Fritz
  47.       fritz@mtl.mit.edu
  48.  
  49.  
  50.  
  51.