diff options
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 |