diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-28 23:32:06 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-28 23:32:06 +0000 |
commit | 9993a3aebb27c5cac55429a23af2d2a0f129cb95 (patch) | |
tree | a6d7ba55042342df7c025027bedb4c583da2c492 /autoconf | |
parent | 1485455be0310c6b24f096823029e08867531016 (diff) | |
download | external_llvm-9993a3aebb27c5cac55429a23af2d2a0f129cb95.zip external_llvm-9993a3aebb27c5cac55429a23af2d2a0f129cb95.tar.gz external_llvm-9993a3aebb27c5cac55429a23af2d2a0f129cb95.tar.bz2 |
Enable -Wcovered-switch-default again, but add -Werror to the checks to make
sure we don't use it with compilers that don't support it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 3 | ||||
-rw-r--r-- | autoconf/m4/cxx_flag_check.m4 | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 3a86531..b28508e 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1115,7 +1115,8 @@ dnl Check optional compiler flags. AC_MSG_CHECKING([optional compiler flags]) CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros]) CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers]) -AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS]) +CXX_FLAG_CHECK(COVERED_SWITCH_DEFAULT, [-Wcovered-switch-default]) +AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT]) dnl===-----------------------------------------------------------------------=== dnl=== diff --git a/autoconf/m4/cxx_flag_check.m4 b/autoconf/m4/cxx_flag_check.m4 index ab09f2a..62454b7 100644 --- a/autoconf/m4/cxx_flag_check.m4 +++ b/autoconf/m4/cxx_flag_check.m4 @@ -1,2 +1,2 @@ AC_DEFUN([CXX_FLAG_CHECK], - [AC_SUBST($1, `$CXX $2 -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)]) + [AC_SUBST($1, `$CXX -Werror $2 -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)]) |