From 9a0847060d5823ec520ebf0c3e307e26442e5b8c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 19 Nov 2015 14:32:54 +0000 Subject: [PATCH] [C++] Default to -Werror in C++ mode too Both x86_64 GNU/Linux and x86_64 mingw-w64 build cleanly with --enable-targets=all. This enables -Werror by default in C++ mode too, in order to let the buildbot catch C++ build regressions for us. gdb/ChangeLog: 2015-11-19 Pedro Alves * configure.ac (ERROR_ON_WARNING): Don't check whether in C++ mode. * configure: Regenerate. gdb/gdbserver/ChangeLog: 2015-11-19 Pedro Alves * configure.ac (ERROR_ON_WARNING): Don't check whether in C++ mode. * configure: Regenerate. --- gdb/ChangeLog | 6 ++++++ gdb/configure | 7 ++----- gdb/configure.ac | 7 ++----- gdb/gdbserver/ChangeLog | 6 ++++++ gdb/gdbserver/configure | 3 +-- gdb/gdbserver/configure.ac | 3 +-- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f136fb70af7..0539d969da2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2015-11-19 Pedro Alves + + * configure.ac (ERROR_ON_WARNING): Don't check whether in C++ + mode. + * configure: Regenerate. + 2015-11-19 Pedro Alves * build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Remove -fpermissive. diff --git a/gdb/configure b/gdb/configure index 8ef3cf26a7a..249a39975b0 100755 --- a/gdb/configure +++ b/gdb/configure @@ -14293,11 +14293,8 @@ if test "${enable_werror+set}" = set; then : fi -# Enable -Werror by default when using gcc in C mode. Leave it off -# for C++ until we're warning clean. Turn it off for releases. -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \ - && test x"$enable_build_with_cxx" != x"yes" \ - && $development; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then ERROR_ON_WARNING=yes fi diff --git a/gdb/configure.ac b/gdb/configure.ac index 29d0b63889a..ebd797bf519 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1932,11 +1932,8 @@ AC_ARG_ENABLE(werror, *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac]) -# Enable -Werror by default when using gcc in C mode. Leave it off -# for C++ until we're warning clean. Turn it off for releases. -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \ - && test x"$enable_build_with_cxx" != x"yes" \ - && $development; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then ERROR_ON_WARNING=yes fi diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 012ea5e254f..c5152491377 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2015-11-19 Pedro Alves + + * configure.ac (ERROR_ON_WARNING): Don't check whether in C++ + mode. + * configure: Regenerate. + 2015-11-19 Pedro Alves * configure: Regenerate. diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 4b9aa9553b9..87dfda06eed 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -6106,8 +6106,7 @@ if test "${enable_werror+set}" = set; then : fi -# Enable -Werror by default when using gcc in C mode. Leave it off -# for C++ until we're warning clean. Turn it off for releases. +# Enable -Werror by default when using gcc. Turn it off for releases. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \ && test x"$enable_build_with_cxx" != x"yes" \ && $development; then diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 0fe0a357ec6..d50d0f15826 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -157,8 +157,7 @@ AC_ARG_ENABLE(werror, *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac]) -# Enable -Werror by default when using gcc in C mode. Leave it off -# for C++ until we're warning clean. Turn it off for releases. +# Enable -Werror by default when using gcc. Turn it off for releases. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \ && test x"$enable_build_with_cxx" != x"yes" \ && $development; then -- 2.30.2