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