home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16233 < prev    next >
Encoding:
Text File  |  1992-11-14  |  1.7 KB  |  53 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!snorkelwacker.mit.edu!ira.uka.de!ira.uka.de!slsvaat!josef!kanze
  3. From: kanze@us-es.sel.de (James Kanze)
  4. Subject: Re: yagh!(yet another hard g++ (problem))
  5. In-Reply-To: kilitzir@antigone.csi.forth.gr's message of 12 Nov 1992 14:28:08 +0200
  6. Message-ID: <KANZE.92Nov13201703@slsvhat.us-es.sel.de>
  7. Sender: news@us-es.sel.de
  8. Organization: SEL
  9. References: <kilitzir.721570562@news.forth.gr>
  10. Date: 13 Nov 92 20:17:03
  11. Lines: 40
  12.  
  13. In article <kilitzir.721570562@news.forth.gr>
  14. kilitzir@antigone.csi.forth.gr (Xristos Kilitzirakis) writes:
  15.  
  16.  
  17. |> Suppose the following program :
  18. |> ----------------------
  19.  
  20.     [actual program deleted...]
  21.  
  22. |> -------------------------
  23. |> 1.(compiled under g++ with unknown version).
  24. |> Now, there's a compiler error in line "base x2 = f2()" - YET the 
  25. |> statement "x = f2();" IS CORRECT!Any comments ?
  26.  
  27. This is just another GNU bug.  If you use g++ any length of time,
  28. you'll get used to them.
  29.  
  30. G++ has definite problems when it comes to generating default copy
  31. constructors, at least in derived classes.  The work-around is always
  32. to provide your own copy constructor for derived classes.  (At least,
  33. it worked for me.  The context where I saw this bug was considerably
  34. different.)
  35.  
  36. Oh, well, you can always console yourself with the thought that you
  37. got what you paid for.
  38.  
  39. |> 2.What do you expect for the program to write ???
  40. |> answer --> bbb bbb !
  41. |> Is that also correct ???
  42.  
  43. Actually, since there were three calls to the "show" routine, I'd
  44. expect "bbb bbb bbb".
  45.  
  46. (BTW, you forgot to declare the return type void of the "show"
  47. routines.)
  48. --
  49. James Kanze            GABI Software, Sarl.
  50. email: kanze@us-es.sel.de    8 rue du Faisan
  51.                 67000 Strasbourg
  52.                 France
  53.