Article View: gnu.gcc.bug
Article #233Re: g++ bug
From: Raymond Nijssen
Date: Mon, 03 Aug 1992 09:48
Date: Mon, 03 Aug 1992 09:48
38 lines
1653 bytes
1653 bytes
In article <9207301824.AA16226@enthuse.bellcore.com> monika@enthuse.bellcore.com (Monika Mevenkamp) writes:
| #include <assert.h>
| #include <istream.h>
| #include <ostream.h>
|
| class Y {
| public:
| Y(int i) { y = i; cout << "init " << this << ' ' << i << "\n"; }
| ~Y() { cout << "kill " << this << ' ' << y << "\n";}
| private:
| int y;
| } ;
|
| int
| main(int ac, char **av)
| {
| char c;
| Y y[5] = {Y(0), Y(1), Y(2), Y(3), Y(4) };
With gcc 2.2.1 (on HP9k/7xx), appending a `&' after Y (which is wrong IMHO)
yields the desired output.
|
| cout << "hello \n";
| return 0;
| }
Just my $0.02 ...
Regards,
-Raymond
--
| Raymond Nijssen | Eindhoven University of Techology |
| | Department of Electrical Engineering |
| phone: +31-40-473373 | Design Automation Section (ES), Room EH 7.16 |
| raymond@es.ele.tue.nl | P.O. Box 513, 5600 MB Eindhoven, The Netherlands |
| | "Trust me. I know what I'm doing" (Sledge Hammer) |
Technical Details
Message-ID:
<RAYMOND.92Aug3114848@anaconda.es.ele.tue.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!es.ele.tue.NL!raymondReferences:
<9207301824.AA16226@enthuse.bellcore.com>Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!es.ele.tue.NL!raymond From: raymond@es.ele.tue.NL (Raymond Nijssen) Subject: Re: g++ bug Message-ID: <RAYMOND.92Aug3114848@anaconda.es.ele.tue.nl> Sender: gnulists@ai.mit.edu Organization: Eindhoven University of Technology, Eindhoven, The Netherlands References: <9207301824.AA16226@enthuse.bellcore.com> Distribution: gnu Date: Mon, 3 Aug 1992 09:48:48 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 39