summaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-11-24 11:02:59 +0000
committerAndrew Cagney <cagney@redhat.com>2000-11-24 11:02:59 +0000
commit92b16af5af9347d34735a1016fa54b6ee4e6eadd (patch)
tree9426f275d0a71ae9be08866e117550374fc77298 /gdb/configure.in
parent6cea9ae2bccd0e799c8a590e768068549b67882d (diff)
downloadgdb-92b16af5af9347d34735a1016fa54b6ee4e6eadd.tar.gz
Add --enable-gdb-build-warnings=... to configure{,.in}.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in20
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index c1967af79da..95121fab3c2 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