🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #333

fix-includes problem?

#333
From: bernstei
Date: Wed, 29 Jul 1992 22:38
54 lines
2737 bytes
Followup-To: gnu.gcc.bug,gnu.gdb.bug

This bug report sent to both bug-gcc and bug-gdb.

There appears to be a bug in either the way fix-includes for gcc 2.2.2
works or the way the gdb-4.6 source expects it to act.

Included is the tail of a compile under gcc-2.2.2 w/o any patches,
fix-includes have been made, using CC=cc, which is to say:

	#!/bin/sh
	/usr/local/bin/gcc -traditional -fwritable-strings -fno-defer-pop $*

using the gmake command:

	gmake CFLAGS="-DGCC_MANGLE_BUG" all-gdb

from a Makefile configured via:

	./configure m68k-hp-bsd

The -DGCC-MANGLE_BUG is as per instructions in the gdb-4.6-gcc.patch.Z file.

I switched to CC=gcc, and it worked.

Looking at gdb-4.6/gdb/infcmd.c:879 did reveal the disturbing:

	const char * const reg_names[] = REGISTER_NAMES;

Anyhow, here's the tail:
------------------------------------------------------------
cc -c -DGCC_MANGLE_BUG      -I. -I. -I./../include -I./../readline  printcmd.c
cc -c -DGCC_MANGLE_BUG      -I. -I. -I./../include -I./../readline  symtab.c
In file included from symtab.c:40:
/usr/local/lib/gcc-lib/m68k-hp-bsd/2.2.2/include/sys/types.h:21: warning: `const' redefined
defs.h:382: warning: this is the location of the previous definition
cc -c -DGCC_MANGLE_BUG      -I. -I. -I./../include -I./../readline  symfile.c
In file included from symfile.c:36:
/usr/local/lib/gcc-lib/m68k-hp-bsd/2.2.2/include/sys/types.h:21: warning: `const' redefined
defs.h:382: warning: this is the location of the previous definition
cc -c -DGCC_MANGLE_BUG      -I. -I. -I./../include -I./../readline  symmisc.c
cc -c -DGCC_MANGLE_BUG      -I. -I. -I./../include -I./../readline  infcmd.c
In file included from /usr/local/lib/gcc-lib/m68k-hp-bsd/2.2.2/include/sys/param.h:51, from infcmd.c:22:
/usr/local/lib/gcc-lib/m68k-hp-bsd/2.2.2/include/sys/types.h:21: warning: `const' redefined
defs.h:382: warning: this is the location of the previous definition
infcmd.c:879: conflicting types for `reg_names'
defs.h:560: previous declaration of `reg_names'
gmake[1]: *** [infcmd.o] Error 1
gmake: *** [all-gdb] Error 1
------------------------------------------------------------

Michael Bernstein                         bernstei@cs.colorado.edu
Undergraduate Operations Group (Ugrad/Ops)
Computer Science Department, The University of Colorado at Boulder
Technical Details
Message-ID: <199207292138.AA09209@kinglear.cs.Colorado.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!bu.edu!ai-lab!ai.mit.edu!gnulists

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!bu.edu!ai-lab!ai.mit.edu!gnulists
From: bernstei@kinglear.cs.colorado.edu
Newsgroups: gnu.gcc.bug,gnu.gdb.bug
Subject: fix-includes problem?
Message-ID: <199207292138.AA09209@kinglear.cs.Colorado.EDU>
Date: 29 Jul 92 22:38:17 GMT
Lines: 54
Approved: info-gnu@prep.ai.mit.edu
To: bug-gdb@prep.ai.mit.edu
Cc: bug-gcc@prep.ai.mit.edu