From: Bruno Haible Date: Wed, 29 Mar 2023 00:07:28 +0000 (+0200) Subject: Update after gnulib changed. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2F0.21.x;p=thirdparty%2Fgettext.git Update after gnulib changed. * gettext-runtime/intl/verify.h: Update from gnulib. --- diff --git a/gettext-runtime/intl/verify.h b/gettext-runtime/intl/verify.h index 42307c0be..657c5f916 100644 --- a/gettext-runtime/intl/verify.h +++ b/gettext-runtime/intl/verify.h @@ -220,8 +220,15 @@ template /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ #ifdef _GL_STATIC_ASSERT_H # if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert -# define _Static_assert(R, ...) \ - _GL_VERIFY ((R), "static assertion failed", -) +# if !defined _MSC_VER || defined __clang__ +# define _Static_assert(...) \ + _GL_VERIFY (__VA_ARGS__, "static assertion failed", -) +# else + /* Work around MSVC preprocessor incompatibility with ISO C; see + . */ +# define _Static_assert(R, ...) \ + _GL_VERIFY ((R), "static assertion failed", -) +# endif # endif # if (!defined static_assert \ && (!defined __cplusplus \ @@ -231,9 +238,8 @@ template /* MSVC 14 in C++ mode supports the two-arguments static_assert but not the one-argument static_assert, and it does not support _Static_assert. We have to play preprocessor tricks to distinguish the two cases. - Since the MSVC preprocessor is not ISO C compliant (cf. - ), the solution is specific - to MSVC. */ + Since the MSVC preprocessor is not ISO C compliant (see above),. + the solution is specific to MSVC. */ # define _GL_EXPAND(x) x # define _GL_SA1(a1) static_assert ((a1), "static assertion failed") # define _GL_SA2 static_assert