]> Savannah Git Hosting - gnulib.git/commitdiff
std-gnu23: pacify GCC 15
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Nov 2024 19:51:23 +0000 (11:51 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Nov 2024 20:18:30 +0000 (12:18 -0800)
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-11/msg00140.html
* m4/std-gnu23.m4 (_AC_C_C23_TEST_GLOBALS): Add parens.
While we’re at it, use sizeof so that the expression is a
conforming integer constant expression.

ChangeLog
m4/std-gnu23.m4

index b66fe3f4caacf3dcdc0e8a5c92fd00afe117e12f..c33d652b079d4d87d47bdf01f929214df4c8d784 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-11-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       std-gnu23: pacify GCC 15
+       Problem reported by Bruno Haible in:
+       https://lists.gnu.org/r/bug-gnulib/2024-11/msg00140.html
+       * m4/std-gnu23.m4 (_AC_C_C23_TEST_GLOBALS): Add parens.
+       While we’re at it, use sizeof so that the expression is a
+       conforming integer constant expression.
+
 2024-11-16  Bruno Haible  <bruno@clisp.org>
 
        calloc-gnu: Fix bug on 32-bit AIX (regression 2024-11-04).
index cebf62d2830f3bcaa8217c00373816e3644039fb..5b088d2966bdee0c2f99844f445eedd20f9f3070 100644 (file)
@@ -1,5 +1,5 @@
 # std-gnu23.m4
-# serial 2
+# serial 3
 
 # Prefer GNU C23 to earlier versions.
 
@@ -425,7 +425,9 @@ int function_with_unnamed_parameter (int) { return 0; }
 
 void c23_noreturn ();
 
-bool use_u8 = !u8"\xFF" == u8'\''x'\'';
+/* Test parsing of string and char UTF-8 literals (including hex escapes).
+   The parens pacify GCC 15.  */
+bool use_u8 = (!sizeof u8"\xFF") == (!u8'\''x'\'');
 
 bool check_that_bool_works = true | false | !nullptr;
 #if !true