From 45b38c225bcdeef919723c27e81aa5ec97c9a89e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 7 Aug 2025 13:27:29 -0700 Subject: [PATCH] Port _AC_C_C99_TEST_GLOBALS to -Wc++-compat MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- lib/autoconf/c.m4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.47.3