Mercurial > gnulib
changeset 40098:3cd6033a8985
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.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 10 Jan 2019 21:06:52 +0100 |
parents | c71dbb9ccffb |
children | 9735cc8a05ba |
files | ChangeLog lib/verify.h |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jan 08 15:50:28 2019 +0100 +++ b/ChangeLog Thu Jan 10 21:06:52 2019 +0100 @@ -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.
--- a/lib/verify.h Tue Jan 08 15:50:28 2019 +0100 +++ b/lib/verify.h Thu Jan 10 21:06:52 2019 +0100 @@ -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