]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Port _AC_C_C99_TEST_GLOBALS to -Wc++-compat
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 7 Aug 2025 20:27:29 +0000 (13:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 7 Aug 2025 20:51:19 +0000 (13:51 -0700)
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

index da367790394fe5a78b67a4d786f2e1da9c510c1a..a36f56c7e8fd5b358c6f531d16bfb50043aee001 100644 (file)
@@ -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);
 }