From: Paul Eggert Date: Thu, 7 Aug 2025 20:27:29 +0000 (-0700) Subject: Port _AC_C_C99_TEST_GLOBALS to -Wc++-compat X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45b38c225bcdeef919723c27e81aa5ec97c9a89e;p=thirdparty%2Fautoconf.git Port _AC_C_C99_TEST_GLOBALS to -Wc++-compat Problem reported by Vincent Lefevre in: https://lists.gnu.org/r/autoconf-patches/2025-08/msg00004.html * lib/autoconf/c.m4 (_AC_C_C99_TEST_GLOBALS): and → aND. --- diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index da3677903..a36f56c7e 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -1214,7 +1214,8 @@ extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. +// FILE and stderr, and "aND" is used instead of "and" to work around +// GCC bug 40564 which is irrelevant here. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) @@ -1225,7 +1226,7 @@ test_varargs_macros (void) int y = 5678; debug ("Flag"); debug ("X = %d\n", x); - showlist (The first, second, and third items.); + showlist (The first, second, aND third items.); report (x>y, "x is %d but y is %d", x, y); }