summaryrefslogtreecommitdiff
path: root/gdb/warning.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/warning.m4')
-rw-r--r--gdb/warning.m423
1 files changed, 5 insertions, 18 deletions
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index 8d7ce68ce3f..849fa2d7190 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -35,21 +35,12 @@ if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
-# These options work in either C or C++ modes.
+# The options we'll try to enable.
build_warnings="-Wall -Wpointer-arith \
-Wno-unused -Wunused-value -Wunused-function \
-Wno-switch -Wno-char-subscripts \
--Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
-
-# Now add in C and C++ specific options, depending on mode.
-if test "$enable_build_with_cxx" = "yes"; then
- build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
--Wno-narrowing"
-else
- build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
--Wdeclaration-after-statement -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-fi
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
+-Wno-sign-compare -Wno-write-strings -Wno-narrowing"
# Enable -Wno-format by default when using gcc on mingw since many
# GCC versions complain about %I64.
@@ -89,9 +80,7 @@ fi])dnl
# The set of warnings supported by a C++ compiler is not the same as
# of the C compiler.
-if test "$enable_build_with_cxx" = "yes"; then
- AC_LANG_PUSH([C++])
-fi
+AC_LANG_PUSH([C++])
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
@@ -127,7 +116,5 @@ fi
AC_SUBST(WARN_CFLAGS)
AC_SUBST(WERROR_CFLAGS)
-if test "$enable_build_with_cxx" = "yes"; then
- AC_LANG_POP([C++])
-fi
+AC_LANG_POP([C++])
])