🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #381

Re: Bug in gcc 2.1

#381
From: Mike Stump
Date: Mon, 13 Apr 1992 21:42
48 lines
2257 bytes
This problem should be fixed in the next version of gcc.

> From: Frank Nobis <fn@trinity.do.open.de>
> Message-Id: <9204130517.AA01491@trinity.do.open.de>
> Subject: Bug in gcc 2.1
> To: bug-gcc@prep.ai.mit.edu
> Date: Mon, 13 Apr 92 7:17:00 MEST
> X-Mailer: ELM [version 2.3 PL11]
> Resent-From: bug-gcc-request@prep.ai.mit.edu

> I got a fatal compiler error from cc1plus.

> This is the code wich produced the bug.

> -----------------------------------------------------------------------------
> // This may look like C code, but it is really -*- C++ -*-

> class t {
>   int	some_data;
> public:
>   typedef unsigned long ulong;
>   t() { some_data = 0; };
>   void some_function(void) { some_data++; };
> };

> int main()
> {
>   t	t1;

>   t1.some_function();

>   return (0);
> }
> ------------------------------------------------------------------------------

> This code will compile without errors if you move the typedef before
> the definition of the class. But I think this it is legal to put a
> typedef inside a class definiton.

> This is the output from gcc.

> Reading specs from /usr/local/lib/gcc-lib/i386sco/2.1/specs
> gcc version 2.1
>  /usr/local/lib/gcc-lib/i386sco/2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dunix -Di386 -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP -DSCO -DUSG -D__unix__ -D__i386__ -D__M_UNIX__ -D__M_I386__ -D__M_COFF__ -D__M_WORDSWAP__ -D__SCO__ -D__USG__ -D__unix -D__i386 -D__M_UNIX -D__M_I386 -D__M_COFF -D__M_WORDSWAP -D__SCO -D__USG bug.cc /usr/tmp/cca01420.i
> GNU CPP version 2.1 (80386, ATT syntax)
>  /usr/local/lib/gcc-lib/i386sco/2.1/cc1plus /usr/tmp/cca01420.i -quiet -dumpbase bug.cc -version -o /usr/tmp/cca01420.s
> GNU C++ version 2.1 (80386, ATT syntax) compiled by GNU C version 2.1.
> /usr/local/bin/gcc: Internal compiler error: program cc1plus got fatal signal 10
Technical Details
Message-ID: <9204132142.AA01060@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:  Bug in gcc 2.1
Message-ID: <9204132142.AA01060@cygnus.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 13 Apr 1992 21:42:41 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 49