🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #854

BUG in GCC (G++) 1.36 (1.36.1) with COFF & -g & prototypes

#854
From: rfg
Date: Thu, 07 Dec 1989 21:49
36 lines
1494 bytes
If you are using ansi prototype style for your function definitions
(manditory in C++) then it is possible that you may eventually come
across a prototyped function definition in which one or more of the
formal parameter names have been left out.  For example:

void quiet_File_error_handler(char*)
{
  errno = 0;
}

The example above comes from libg++ (1.36.1).  This is legal ansi (and C++)
but if you are using GCC 1.36 or G++ 1.36.1 with COFF and using -g, you
will get cc1 (or cc1plus) segfaulting on the example shown above.

The fix is simple, and is provided below.  (Your line numbers may vary.)

Enjoy,

// rfg

*** sdbout.c-	Tue Nov 28 23:37:01 1989
--- sdbout.c	Thu Dec  7 13:18:07 1989
***************
*** 1040,1044 ****
  	    }
  	  
! 	  name = IDENTIFIER_POINTER (DECL_NAME (parms));
  	  if (name == (char *)0 || *name == '\0')
  	    name = gen_fake_label ();
--- 1040,1044 ----
  	    }
  	  
! 	  name = DECL_NAME (parms) ? IDENTIFIER_POINTER (DECL_NAME (parms)) : 0;
  	  if (name == (char *)0 || *name == '\0')
  	    name = gen_fake_label ();
Technical Details
Message-ID: <8912071349.aa01989@ICS.UCI.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ICS.UCI.EDU!rfg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ICS.UCI.EDU!rfg
From: rfg@ICS.UCI.EDU
Newsgroups: gnu.gcc.bug
Subject: BUG in GCC (G++) 1.36 (1.36.1) with COFF & -g & prototypes
Message-ID: <8912071349.aa01989@ICS.UCI.EDU>
Date: 7 Dec 89 21:49:08 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36