summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-01 09:38:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-10-01 09:42:57 +0200
commit7756a9581d531d9353dc72675f62d17c2b314170 (patch)
treef7ef9f79ab925cc1ead1e97ce43fdc8befcaad8f /configure.ac
parentebfc6b6863fa54abd33ba95130a8434c70e42f58 (diff)
Don't let old Clang using -std=c++11 mis-detect HAVE_CXX14_CONSTEXPR
...where an assert in a constexpr function merely triggers a -Wc++1y-extensions (so doesn't stop configure from assuming HAVE_CXX14_CONSTEXPR, but will later break with --enable-werror when building include/o3tl/typed_flags_set.hxx). So stuff back the complex constexpr test function that was swapped out with 6cc54913077864ba92d2fdc3addec29ea89770fe "Work around GCC 5.1 ICE." Change-Id: I04ba1dc08d96f776b331fa9d0cae1703f2796532
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index aec3e4a0cca0..946aa79e0766 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6347,6 +6347,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
}
enum E { e };
auto v = g(E::e);
+
+ struct S {
+ int n_;
+ constexpr bool f() {
+ int n = n_;
+ int i = 0;
+ while (n > 0) { --n; ++i; }
+ return i == 0;
+ }
+ };
]])], [cxx14_constexpr=yes], [cxx14_constexpr=no])
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS