🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #202

g++ bug

#202
From: Monika Mevenkamp
Date: Thu, 30 Jul 1992 10:24
52 lines
1291 bytes
I use what the man page calls 
"g++ - GNU project C++ Compiler (v2 preliminary)".

The program: 
------
	#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) };
	
   	   cout << "hello \n"; 
   	   return 0;
	} 
------

produces this output:

------
init 0xf7fff9a0 0
init 0xf7fff9a4 1
init 0xf7fff9a8 2
init 0xf7fff9ac 3
init 0xf7fff9b0 4
hello 
kill 0xf7fff9b4 0
kill 0xf7fff9b4 0
kill 0xf7fff9b4 0
kill 0xf7fff9b4 0
kill 0xf7fff9b4 0
kill 0xf7fff9b0 4
kill 0xf7fff9ac 3
kill 0xf7fff9a8 2
kill 0xf7fff9a4 1
kill 0xf7fff9a0 0
------

Seems wrong to me,

Monika
Technical Details
Message-ID: <9207301824.AA16226@enthuse.bellcore.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!enthuse.bellcore.com!monika

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!enthuse.bellcore.com!monika
From: monika@enthuse.bellcore.com (Monika Mevenkamp)
Subject: g++ bug
Message-ID: <9207301824.AA16226@enthuse.bellcore.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 30 Jul 1992 10:24:06 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 53