From 51216631bc135875ab05fee0a078f64b823419e6 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 15 Mar 2005 23:25:59 +0000 Subject: sim/common/ChangeLog: 2005-02-28 Jim Blandy * aclocal.m4 (SIM_AC_OPTION_WARNINGS): Don't include -Wuninitialized in the default list of build warnings if CFLAGS is set, and doesn't include -O. (Using -Wuninitialized without optimization produces a warning, which interferes with compilation with -Werror.) sim/ChangeLog: 2005-02-28 Jim Blandy * d10v/configure.ac, igen/configure.ac, m68hc11/configure.ac, mips/configure.ac, mn10300/configure.ac, v850/configure.ac: Regenerated, after change to common/aclocal.m4. --- sim/igen/configure | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sim/igen') diff --git a/sim/igen/configure b/sim/igen/configure index 139d10b..18d3f28 100755 --- a/sim/igen/configure +++ b/sim/igen/configure @@ -2343,7 +2343,18 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # NOTE: If you add to this list, remember to update # gdb/doc/gdbint.texinfo. build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ --Wformat -Wparentheses -Wpointer-arith -Wuninitialized" +-Wformat -Wparentheses -Wpointer-arith" +# GCC supports -Wuninitialized only with -O or -On, n != 0. +if test x${CFLAGS+set} = xset; then + case "${CFLAGS}" in + *"-O0"* ) ;; + *"-O"* ) + build_warnings="${build_warnings} -Wuninitialized" + ;; + esac +else + build_warnings="${build_warnings} -Wuninitialized" +fi # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual -- cgit v1.1