Article View: gnu.g++.bug
Article #2034g++ bug
From: sdm
Date: Fri, 26 May 1989 18:37
Date: Fri, 26 May 1989 18:37
24 lines
1201 bytes
1201 bytes
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 :-).
Since I'm not in charge of installing the compiler, I'm not sure what the
names of the files 'tm.h' and 'md' were during installation, but I did poke
around in the installation directory, and files with those names exist
there. If you can't do anything without the names of those files, let me
know, and I'll find out what was used during installation.
Scott Meyers
sdm@cs.brown.edu
Technical Details
Message-ID:
<8905261837.AA02121@sundry.cs.brown.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!CS.BROWN.EDU!sdmShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!CS.BROWN.EDU!sdm From: sdm@CS.BROWN.EDU Newsgroups: gnu.g++.bug Subject: g++ bug Message-ID: <8905261837.AA02121@sundry.cs.brown.edu> Date: 26 May 89 18:37:14 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 24