This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Makefile] Bootstrap with -Wold-style-definition


A simple patch which adds in -Wold-style-definition to the bootstrap to which should help everyone remember to retain the C90 conversion.

This bootstraps on i686-pc-cygwin with all langauges enabled -- including ada after the previous two C90 patches were applied and the attached simple ada patch to add -Wno-error to b-gnat1.c (which is apparently a generated file).

It should succeed on almost all other targets; if not they should be fixed, which I am perfectly willing to help out on. Until then, those targets still would be able to bootstrap with --disable-werror.

Note that this patch also adds in a nice simple framework to add in any additional new warnings that others may find useful to compile GCC with.

OK?

Kelley Cook

2003-10-30  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.in (LOOSE_WARN_XGCC): New variable.
	(POSTSTAGE1_FLAGS_TO_PASS): Use it.

*** Makefile.in.orig	Sun Oct 26 19:26:42 2003
--- Makefile.in	Thu Oct 30 10:02:45 2003
*************** coverageexts = .{gcda,gcno}
*** 145,156 ****
  # off if they wish.
  # LOOSE_WARN are the warning flags to use when compiling something
  # which is only compiled with gcc, such as libgcc and the frontends
! # other than C.
  # STRICT_WARN and STRICT2_WARN are the additional warning flags to
  # apply to the back end and the C front end, which may be compiled
  # with other compilers.  This is partially controlled by configure in
  # stage1, as not all versions of gcc understand -Wno-long-long.
  LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
  STRICT_WARN = @strict1_warn@
  STRICT2_WARN = -pedantic -Wno-long-long @WERROR@
  
--- 145,161 ----
  # off if they wish.
  # LOOSE_WARN are the warning flags to use when compiling something
  # which is only compiled with gcc, such as libgcc and the frontends
! # other than C.   These flags need to be available back to at least GCC 2.7.2.
! # LOOSE_WARN_XGCC also contains some newer warning flags tha we wish to use 
! # when compiling something which is only compiled with a freshly compilied 
! # GCC, since it contains flags that did not exist for older versions of GCC.
  # STRICT_WARN and STRICT2_WARN are the additional warning flags to
  # apply to the back end and the C front end, which may be compiled
  # with other compilers.  This is partially controlled by configure in
  # stage1, as not all versions of gcc understand -Wno-long-long.
  LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+ LOOSE_WARN_XGCC = -Wall -Wextra -Wwrite-strings -Wstrict-prototypes \
+                   -Wmissing-prototypes -Wold-style-definition
  STRICT_WARN = @strict1_warn@
  STRICT2_WARN = -pedantic -Wno-long-long @WERROR@
  
*************** POSTSTAGE1_FLAGS_TO_PASS = \
*** 3365,3370 ****
--- 3370,3376 ----
  	LDFLAGS="$(BOOT_LDFLAGS)" \
  	WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \
  	STRICT_WARN="$(STRICT2_WARN)" \
+ 	LOOSE_WARN="$(LOOSE_WARN_XGCC)" \
  	libdir=$(libdir) \
  	LANGUAGES="$(LANGUAGES)" \
  	MAKEINFO="$(MAKEINFO)" \
2003-10-30  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.in (ada/b_gnat1.o): Compile with -Wno-error.

diff -u gcc-3.4-20031029/gcc/ada/Make-lang.in gcc-new/gcc/ada/Make-lang.in
--- gcc-3.4-20031029/gcc/ada/Make-lang.in	2003-10-27 09:27:17.000000000 -0500
+++ gcc-new/gcc/ada/Make-lang.in	2003-10-30 17:47:05.503547200 -0500
@@ -86,6 +86,7 @@
 ada-warn = $(ALL_ADA_CFLAGS) $(WERROR)
 # unresolved warnings in a couple of files
 ada/tracebak.o-warn = -Wno-error
+ada/b_gnat1.o-warn = -Wno-error
 ada/b_gnatb.o-warn = -Wno-error
 
 .adb.o:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]