🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

g++ bug

#996
From: Jaime Pereira
Date: Tue, 29 Sep 1992 23:09
50 lines
1340 bytes
//
// The following program produces a compiler internal error when compiled
// with gcc 2.2.2:
//
// 	argus% gcc -v
// 	Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/specs
// 	gcc version 2.2.2
//
// 	argus% gcc -c bug5.C
//	bug5.cc: In function `int  main ()':
//	bug5.cc:42: internal compiler error 89, please report
//
// The compiler was compiled and installed under SunOS 4.1.1 without
// any special flags. 
//
// The same problem also appears when compiled with gcc under 
// Interactive Unix SVR3.2.
// 	  
// The problem seems to be related to naming a member function the
// same as a union AND using the member function.
// 
	     

union wait
	{
	int a;
	double b;
	};


class C1
	{
public:
	int	wait()	{ return 1; };
	};



int main()
	{
	C1 x;
	x.wait();
	}

//
// Regards,
//
// Jaime Pereira
// 70441.465@compuserve.com
//
Technical Details
Message-ID: <920929230935_70441.465_DHB43-1@CompuServe.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!compuserve.COM!70441.465

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!compuserve.COM!70441.465
From: 70441.465@compuserve.COM (Jaime Pereira)
Subject: g++ bug
Message-ID: <920929230935_70441.465_DHB43-1@CompuServe.COM>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 29 Sep 1992 23:09:35 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 53