Path: 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 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 ();