non-static definition after static declaration

Philippe De Muyter phdm@macqel.be
Fri Nov 26 02:23:00 GMT 1999


Problem :
"/share/src/gnu/egcs-19991122/gcc/integrate.c", line 2355: redeclaration of mark
_stores
"/share/src/gnu/egcs-19991122/gcc/integrate.c", line 2358: cannot recover from e
arlier errors: goodbye!
gnumake[2]: *** [integrate.o] Error 1
...
"/share/src/gnu/egcs-19991122/gcc/regclass.c", line 777: redeclaration of dump_r
egclass
"/share/src/gnu/egcs-19991122/gcc/regclass.c", line 778: cannot recover from ear
lier errors: goodbye!
gnumake[2]: *** [regclass.o] Error 1

Fix :
As we want to be able to bootstrap gcc with old compilers, I think we should
add `-Wtraditional' in WARN_CFLAGS.

Fri Nov 26 10:42:54 1999  Philippe De Muyter  <phdm@macqel.be>

	* integrate.c (mark_stores): Function definition made void, to match
	previous declaration.
	* regclass.c (dump_regclass): Ditto.
	* Makefile.in (WARN_CFLAGS): Macro augmented by `-Wtraditional'.

--- ./gcc/integrate.c	Fri Nov 26 10:35:14 1999
+++ ./gcc/integrate.c	Wed Nov 24 13:54:55 1999
@@ -2350,7 +2350,7 @@ subst_constants (loc, insn, map, memonly
 /* Show that register modified no longer contain known constants.  We are
    called from note_stores with parts of the new insn.  */
 
-void
+static void
 mark_stores (dest, x, data)
      rtx dest;
      rtx x ATTRIBUTE_UNUSED;
--- ./gcc/regclass.c	Fri Nov 26 10:35:17 1999
+++ ./gcc/regclass.c	Wed Nov 24 15:38:38 1999
@@ -772,7 +772,7 @@ regclass_init ()
 }
 
 /* Dump register costs.  */
-void
+static void
 dump_regclass (dump)
      FILE *dump;
 {
--- ./gcc/Makefile.in	Fri Nov 26 10:35:18 1999
+++ ./gcc/Makefile.in	Thu Nov 25 18:47:50 1999
@@ -70,7 +70,7 @@
 TCFLAGS =
 CFLAGS = -g @stage1_warn_cflags@
 BOOT_CFLAGS = -O2 $(CFLAGS)
-WARN_CFLAGS = -W -Wall
+WARN_CFLAGS = -W -Wall -Wtraditional
 # These exists to be overridden by the x-* and t-* files, respectively.
 X_CFLAGS =
 T_CFLAGS =


More information about the Gcc-patches mailing list