From b8df54ffbefc5ddf40ddcda68a2a682769c5833d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 9 Apr 2012 00:45:59 -0700 Subject: configure: new option --enable-gcc-warnings I have been using this change for many months in my private copy of Emacs, and have used it to find several bugs. It's mature enough to publish now. * Makefile.in (GNULIB_MODULES): Add warnings, manywarnings. * configure.in: Support --enable-gcc-warnings, in the style of other GNU packages such as coreutils. (C_WARNINGS_SWITCH): Remove, replacing with... (WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable. (PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I, when including system files with GCC. * etc/NEWS: Mention --enable-gcc-warnings. * lib/Makefile.am (AM_CFLAGS): New macro. * m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib. * lib-src/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (BASE_CFLAGS): Use new macros rather than old. * lwlib/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (ALL_CFLAGS): Use new macros rather than old. * oldXMenu/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (ALL_CFLAGS): Use new macros rather than old. * src/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (ALL_CFLAGS): Use new macros rather than old. * src/process.c: Ignore -Wstrict-overflow to work around GCC bug 52904. * src/regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore -Wunused-but-set-variable, -Wunused-function, -Wunused-macros, -Wunused-result, -Wunused-variable. This should go away once the Emacs and Gnulib regex code is merged. (xmalloc, xrealloc): Now static. --- oldXMenu/Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'oldXMenu/Makefile.in') diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in index 94c49fb9966..e7bc402cb0d 100644 --- a/oldXMenu/Makefile.in +++ b/oldXMenu/Makefile.in @@ -48,8 +48,9 @@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ -C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ EXTRA=insque.o CC=@CC@ @@ -89,7 +90,7 @@ all:: libXMenu11.a ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ $(C_SWITCH_X_SITE) $(C_SWITCH_X_SYSTEM) \ - ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} \ $(CPPFLAGS) $(CFLAGS) -DEMACS_BITMAP_FILES \ -I../src -I${srcdir} -I${srcdir}/../src -- cgit v1.2.1