From 1decb32380b8eacf945595321f515d9035a01d6c Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 7 Apr 2000 08:57:39 +0000 Subject: When GCC always enable certain warnings. Allow configure to set CFLAGS (-g -O2) when GCC. --- gdb/configure.in | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gdb/configure.in') diff --git a/gdb/configure.in b/gdb/configure.in index 48beb0b..025d8e3 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -454,12 +454,14 @@ if test "${enable_netrom}" = "yes"; then CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" fi + +build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ +-Wformat -Wparentheses -Wpointer-arith" +# Not yet: -Wall -Wpointer-arith -Wstrict-prototypes +# -Wmissing-prototypes -Wmissing-declarations AC_ARG_ENABLE(build-warnings, [ --enable-build-warnings Enable build-time compiler warnings if gcc is used], -[ -# not yet: -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith" -case "${enableval}" in +[case "${enableval}" in yes) ;; no) build_warnings="-w";; ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` @@ -470,7 +472,7 @@ case "${enableval}" in esac if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then echo "Setting warning flags = $build_warnings" 6>&1 -fi +fi])dnl WARN_CFLAGS="" WERROR_CFLAGS="" if test "x${build_warnings}" != x -a "x$GCC" = xyes @@ -483,8 +485,7 @@ then *) WARN_CFLAGS="${WARN_CFLAGS} $w" esac done -fi],[build_warnings=""])dnl - +fi AC_SUBST(WARN_CFLAGS) AC_SUBST(WERROR_CFLAGS) -- cgit v1.1