From 31260fb8469ba4c69f53e354704fbf151798af5e Mon Sep 17 00:00:00 2001 From: "Loren J. Rittle" Date: Thu, 20 Mar 2003 03:11:25 +0000 Subject: [PATCH] Makefile.in (STRICT2_WARN): Add @WERROR@. * Makefile.in (STRICT2_WARN): Add @WERROR@. (GCC_WARN_CFLAGS): Remove $(WERROR). (fixinc.sh-warn): New. * ada/Make-lang.in (ada-warn): Add $(WERROR). * cp/Make-lang.in (cp-warn): Add $(WERROR). * f/Make-lang.in (f-warn): Add $(WERROR). * java/Make-lang.in (java-warn): Add $(WERROR). * treelang/Make-lang.in (treelang-warn): Add $(WERROR). From-SVN: r64606 --- gcc/ChangeLog | 11 +++++++++++ gcc/Makefile.in | 9 +++++++-- gcc/ada/Make-lang.in | 2 +- gcc/cp/Make-lang.in | 2 +- gcc/f/Make-lang.in | 2 +- gcc/java/Make-lang.in | 2 +- gcc/treelang/Make-lang.in | 2 +- 7 files changed, 23 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a8272c86e6..3dd1e4694b5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2003-03-19 Loren James Rittle + + * Makefile.in (STRICT2_WARN): Add @WERROR@. + (GCC_WARN_CFLAGS): Remove $(WERROR). + (fixinc.sh-warn): New. + * ada/Make-lang.in (ada-warn): Add $(WERROR). + * cp/Make-lang.in (cp-warn): Add $(WERROR). + * f/Make-lang.in (f-warn): Add $(WERROR). + * java/Make-lang.in (java-warn): Add $(WERROR). + * treelang/Make-lang.in (treelang-warn): Add $(WERROR). + 2003-03-19 Nathanael Nerode * c-common.h (c_dump_tree), c-dump.c (c_dump_tree), diff --git a/gcc/Makefile.in b/gcc/Makefile.in index ce560e74f3f..f2c23fb9868 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -142,7 +142,7 @@ coverageexts = .{da,bbg} # stage1, as not all versions of gcc understand -Wno-long-long. LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes STRICT_WARN = -Wtraditional @strict1_warn@ -STRICT2_WARN = -Wtraditional -pedantic -Wno-long-long +STRICT2_WARN = -Wtraditional -pedantic -Wno-long-long @WERROR@ # This is set by --enable-checking. The idea is to catch forgotten # "extern" tags in header files. @@ -154,7 +154,7 @@ VALGRIND_DRIVER_DEFINES = @valgrind_path_defines@ # This is how we control whether or not the additional warnings are applied. .-warn = $(STRICT_WARN) -GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $(WERROR) $($@-warn) +GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn) # These files are to have -Werror bypassed in stage2: # These are very hard to completely clean due to target complexities. @@ -2475,6 +2475,11 @@ specs.ready: specs $(STAMP) specs.ready; \ fi +# Until someone fixes this recursive make nightmare (please note where +# BUILD_CFLAGS and WARN_CFLAGS are first expanded below versus which +# later make invocation has the fine-grain -warn markings for fixinc): +fixinc.sh-warn = -Wno-error + FIXINCSRCDIR=$(srcdir)/fixinc fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \ $(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/gnu-regex.c \ diff --git a/gcc/ada/Make-lang.in b/gcc/ada/Make-lang.in index c0c0809a5bb..c357ddbaf95 100644 --- a/gcc/ada/Make-lang.in +++ b/gcc/ada/Make-lang.in @@ -83,7 +83,7 @@ ADA_FLAGS_TO_PASS = \ # FIXME: need to add $(ALL_ADA_CFLAGS) to .c.o suffix rule # Use loose warnings for this front end, but add some special flags -ada-warn = $(ALL_ADA_CFLAGS) +ada-warn = $(ALL_ADA_CFLAGS) $(WERROR) # unresolved warnings in a couple of files ada/tracebak.o-warn = -Wno-error ada/b_gnatb.o-warn = -Wno-error diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index f6f707f5152..cd4b21c0d4f 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -90,7 +90,7 @@ CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \ cp/optimize.o cp/mangle.o cp/cp-lang.o # Use loose warnings for this front end. -cp-warn = +cp-warn = $(WERROR) cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \ libcpp.a $(LIBDEPS) diff --git a/gcc/f/Make-lang.in b/gcc/f/Make-lang.in index 16ee90b6374..7acba675a3e 100644 --- a/gcc/f/Make-lang.in +++ b/gcc/f/Make-lang.in @@ -92,7 +92,7 @@ F77_OBJS = f/bad.o f/bit.o f/bld.o f/com.o f/data.o f/equiv.o f/expr.o \ f/stv.o f/stw.o f/symbol.o f/target.o f/top.o f/type.o f/where.o # Use loose warnings for this front end. -f-warn = +f-warn = $(WERROR) # type-punning warning f/sta.o-warn = -Wno-error diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index 24b6acbb9a1..b7c963b0ed0 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -123,7 +123,7 @@ JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \ JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o # Use loose warnings for this front end. -java-warn = +java-warn = $(WERROR) # String length warnings jvspec.o-warn = -Wno-error diff --git a/gcc/treelang/Make-lang.in b/gcc/treelang/Make-lang.in index 51dc49ab6c1..9180d76183f 100644 --- a/gcc/treelang/Make-lang.in +++ b/gcc/treelang/Make-lang.in @@ -64,7 +64,7 @@ TREE_SOURCE = ${srcdir}/treelang/parse.y ${srcdir}/treelang/lex.l ${srcdir}/tree TREE_EXES = tree1$(exeext) #no -Wtraditional warnings, allow long long -treelang-warn = $(LOOSE_WARN) -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations +treelang-warn = $(LOOSE_WARN) -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations $(WERROR) # bison emits some unused static arrays (yytoknum) treelang/parse.o-warn = -Wno-error