]> Savannah Git Hosting - gnulib.git/commit
assert-h: port static_assert to strict C99
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Dec 2022 22:15:43 +0000 (14:15 -0800)
committerBruno Haible <bruno@clisp.org>
Sun, 1 Jan 2023 09:27:38 +0000 (10:27 +0100)
commit76eba394727443ddf32a17c12fc085ad624b6997
tree847a57339bcea92b0cfe67956977ce1680224f14
parent8a4e73687a41feca755ef31b0be1a43574c82408
assert-h: port static_assert to strict C99

* lib/verify.h (_GL_VERIFY): Port MSVC hack back to C99.
Problem found when testing bleeding-edge gzip on IBM XL C for AIX,
V12.1 (5765-J02, 5725-C72), which complained ‘"malloca.c", line
42.56: 1506-041 (E) The invocation of macro _Static_assert
contains fewer arguments than are required by the macro
definition.’  This diagnostic is valid because C99 requires
that if you #define _Static_assert(R, ...) you must call
_Static_assert with at least two arguments.  I found a similar
problem with Sun C 5.9 SunOS_sparc Patch 124867-12 2009/11/22.
ChangeLog
lib/verify.h