dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright (C) 1995-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2017 Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
dnl
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"
-
-# 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.
# 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
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++])
])