home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / gcc / bug / 2634 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.3 KB  |  47 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!dagmar.cray.com!djm
  3. From: djm@dagmar.cray.com (Dave Miller)
  4. Subject: incompatibility in g++ version 2.2.2
  5. Message-ID: <9211052328.AA09542@dagmar.cray.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Thu, 5 Nov 1992 23:28:46 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 34
  12.  
  13. I've been using g++ to run through a course book on c++ from AT&T.  I've found
  14. one incompatibility with the AT&T version.
  15.  
  16. In the course text it clearly specifies that the "=" operator does not need to
  17. be overloaded/defined for a class to itself.  It states that because of
  18. the compatibility with C and C's ability to assign a structure to another,
  19. it is not necessary to do that definition.  We do have an AT&T version on
  20. another machine here and I did verify that was true.
  21.  
  22. For example, given a class:
  23.  
  24.     class String {
  25.  
  26.     public:
  27.     ...
  28.  
  29.     private:
  30.     char text[128];
  31.     }
  32.  
  33. it is possible in a program to:
  34.  
  35.     String a, b;
  36.  
  37.     a = b;
  38.  
  39. without defining the operator.  This doesn't work in g++ but does in the AT&T
  40. version.
  41.  
  42. Not a biggie, but I thought I could report it anyway.
  43.  
  44. Dave Miller
  45. Cray Research, Inc.
  46.  
  47.