Path: 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 Distribution: gnu Organization: University of California at Irvine: ICS Dept. Lines: 25 In article <8905261837.AA02121@sundry.cs.brown.edu> sdm@CS.BROWN.EDU writes: ++ Consider the following program: ++ ++ #include ++ ++ 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 |