From: Bruno Haible Date: Thu, 10 Jan 2019 20:06:52 +0000 (+0100) Subject: verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions. X-Git-Tag: v1.0~5165 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=315eb5ffc17685e13a608513b5bcbe2e10eda629;p=gnulib.git verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions. Reported by Reuben Thomas . * lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6. --- diff --git a/ChangeLog b/ChangeLog index 1849089052..81f83349e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2019-01-10 Bruno Haible + + verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions. + Reported by Reuben Thomas . + * lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6. + 2019-01-06 Bruno Haible maintainer-makefile: Make the configure.ac section optional. diff --git a/lib/verify.h b/lib/verify.h index b2e5f6446e..6930645a35 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -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