diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-11-24 11:02:59 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-11-24 11:02:59 +0000 |
commit | 3b851bce1db6dd84666a59d7c0134cb502114557 (patch) | |
tree | 247220d5108ca525a8c8a41330421789c77e33a9 /gdb/configure.in | |
parent | 64426696342521c31916f186cd62cc5d1a2fc54e (diff) | |
download | gdb-3b851bce1db6dd84666a59d7c0134cb502114557.zip gdb-3b851bce1db6dd84666a59d7c0134cb502114557.tar.gz gdb-3b851bce1db6dd84666a59d7c0134cb502114557.tar.bz2 |
Add --enable-gdb-build-warnings=... to configure{,.in}.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r-- | gdb/configure.in | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index c1967af..95121fa 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -531,8 +531,10 @@ if test "${enable_netrom}" = "yes"; then fi -# Don't add -Wall or -Wunused, they include -Wunused-parameter which -# causes noise. +# NOTE: Don't add -Wall or -Wunused, they both include +# -Wunused-parameter which reports bogus warnings. +# 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" # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs @@ -555,6 +557,20 @@ esac if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then echo "Setting compiler warning flags = $build_warnings" 6>&1 fi])dnl +AC_ARG_ENABLE(gdb-build-warnings, +[ --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used], +[case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 +fi])dnl WARN_CFLAGS="" WERROR_CFLAGS="" if test "x${build_warnings}" != x -a "x$GCC" = xyes |