🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2035

Re: g++ bug

#2035
From: Doug Schmidt
Date: Fri, 26 May 1989 19:52
25 lines
1399 bytes
In article <8905261837.AA02121@sundry.cs.brown.edu> sdm@CS.BROWN.EDU writes:
++ Consider the following program:
++ 
++     #include <stream.h>
++ 
++     class C { public: int x = 5; };
++ 
++     main(){
++       C foo;
++       cout << foo.x << "\n";
++      }
++ 
++ This compiles without warnings or errors under g++ 1.34.2 on a sun3 or sun4
++ running SunOS Release 4.0.  When I run the program, however, the value
++ printed out is not 5.  On the sun4 it's 0, and on the sun3 it's 251656748.
++ I'd prefer to see either a compiler error or correct execution :-).

This appears to be fixed in version 1.35.

Doug
--
On a clear day, under blue skies, there is no need to seek.
And asking about Buddha                +------------------------+
Is like proclaiming innocence,         | schmidt@ics.uci.edu    |
With loot in your pocket.              | office: (714) 856-4043 |
Technical Details
Message-ID: <15893@paris.ics.uci.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!usc!orion.cf.uci.edu!uci-ics!schmidt
References: <8905261837.AA02121@sundry.cs.brown.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!usc!orion.cf.uci.edu!uci-ics!schmidt
From: schmidt@ics.uci.edu (Doug Schmidt)
Newsgroups: gnu.g++.bug
Subject: Re: g++ bug
Message-ID: <15893@paris.ics.uci.edu>
Date: 26 May 89 19:52:42 GMT
References: <8905261837.AA02121@sundry.cs.brown.edu>
Sender: news@paris.ics.uci.edu
Reply-To: Doug Schmidt <schmidt@zola.ics.uci.edu>
Distribution: gnu
Organization: University of California at Irvine: ICS Dept.
Lines: 25