]> Savannah Git Hosting - gnulib.git/commitdiff
verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions.
authorBruno Haible <bruno@clisp.org>
Thu, 10 Jan 2019 20:06:52 +0000 (21:06 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 10 Jan 2019 20:06:52 +0000 (21:06 +0100)
Reported by Reuben Thomas <rrt@sc3d.org>.

* lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6.

ChangeLog
lib/verify.h

index 18490890525f4903db8be7a383824c4ec99ae969..81f83349e5b397cc1fc75abf76304af9c3a9370f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-01-10  Bruno Haible  <bruno@clisp.org>
+
+       verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions.
+       Reported by Reuben Thomas <rrt@sc3d.org>.
+       * lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6.
+
 2019-01-06  Bruno Haible  <bruno@clisp.org>
 
        maintainer-makefile: Make the configure.ac section optional.
index b2e5f6446e1e34f30a532a5c6e95331c259592a9..6930645a35014db3bf2dfd0e12ee9553ad89d983 100644 (file)
@@ -26,7 +26,7 @@
    here generates easier-to-read diagnostics when verify (R) fails.
 
    Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
-   This will likely be supported by future GCC versions, in C++ mode.
+   This is supported by GCC 6.1.0 and later, in C++ mode.
 
    Use this only with GCC.  If we were willing to slow 'configure'
    down we could also use it with other compilers, but since this
@@ -36,9 +36,7 @@
      && !defined __cplusplus)
 # define _GL_HAVE__STATIC_ASSERT 1
 #endif
-/* The condition (99 < __GNUC__) is temporary, until we know about the
-   first G++ release that supports static_assert.  */
-#if (99 < __GNUC__) && defined __cplusplus
+#if (6 <= __GNUC__) && defined __cplusplus
 # define _GL_HAVE_STATIC_ASSERT 1
 #endif