🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #427

Re: GCC (C++) 2.01 - additional info

#427
From: Mike Stump
Date: Wed, 15 Apr 1992 22:16
67 lines
2564 bytes
This is not a problem with gcc, but rather g++, so the report should not
go to the bug-gcc list, but rather the 
	bug-g++@prep.ai.mit.edu
list.

I will answer for now anyways, the problem has been fixed, the next release
of gcc should be better.

> Date: Tue, 14 Apr 92 13:21:55 EDT
> From: keith@thinkage.on.ca (Keith Dorken)
> Message-Id: <9204141721.AA13968@sabre.Thinkage.On.CA>
> To: bug-gcc@prep.ai.mit.edu
> Subject: GCC (C++) 2.01 - additional info
> Resent-From: bug-gcc-request@prep.ai.mit.edu

> The bug in GCC that causes the compiler to go into an infinite loop
> during parsing has been isolated even further in the following
> (smaller!) sample code.  You can eliminate any one section of the
> code surrounded by BUG, BUG1 or BUG2, and the parsing problem goes
> away. Any known fixes would be appreciated..

> This is the .h header file. To reproduce, put everything below
> "SAMPLE" into a bug.h file, create a bug.cc file with '#include
> "bug.h"' in it, and compile with c++ -c bug.cc

> This problem is for the compiler identified by 
> Reading specs from /n/server/usr/local/languages/gnu-compilers/lib/gcc-lib/sun4os4/2.1/specs
> gcc version 2.1
>  /n/server/usr/local/languages/gnu-compilers/lib/gcc-lib/sun4os4/2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix junk.cc /usr/tmp/cca13962.i
> GNU CPP version 2.1 (sparc)

> ---------- SAMPLE ----------
> #define BUG		// remove either BUG
> #define BUG1	// or BUG1 
> #define BUG2	// or BUG2 and the parsing problem goes away.
> class Unsigned36
> {
> protected:
>   char*	rep;

> public:
> 	Unsigned36();
> #ifdef BUG2
> 	Unsigned36(int);
> #endif
> 	operator int();
> #ifdef BUG
>    friend
> #endif
>  int	operator == (const Unsigned36&, const Unsigned36&);
> };

> int operator ! (const Unsigned36& x);

> inline Unsigned36::Unsigned36() : rep( (char *)0 )
>   {
>   }
> inline unsigned int Unsigned36::operator int()
>   {
> 	return ( rep[0] );
>   }
> inline int operator ! ( Unsigned36& x )
>   {
> #ifdef BUG1
> 	return( x == 0 );
> #endif
>   }
Technical Details
Message-ID: <9204152216.AA28654@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrs

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrs
From: mrs@cygnus.com (Mike Stump)
Subject: Re:  GCC (C++) 2.01 - additional info
Message-ID: <9204152216.AA28654@cygnus.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 15 Apr 1992 22:16:02 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 81