]> Savannah Git Hosting - gnulib.git/commitdiff
stddef-h: port better to future GCC 13.4, 14.3
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 25 Apr 2025 23:57:48 +0000 (16:57 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Apr 2025 00:04:29 +0000 (17:04 -0700)
* m4/stddef_h.m4 (gl_STDDEF_H): The idempotency bug should
be fixed in GCC 13.4 and 14.3, if and when they’re published.

ChangeLog
doc/posix-headers/stddef.texi
lib/stddef.in.h
m4/stddef_h.m4

index 99c2c9c8930c60b90fcf083c9130f9cbb89d65ba..37bfcc814a984f2e713052552e1501bd992ef208 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-04-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       stddef-h: port better to future GCC 13.4, 14.3
+       * m4/stddef_h.m4 (gl_STDDEF_H): The idempotency bug should
+       be fixed in GCC 13.4 and 14.3, if and when they’re published.
+
 2025-04-25  Bruno Haible  <bruno@clisp.org>
 
        unistdio/u*-vasnprintf: Fix handling of grouping rule.
index ac84f00779e127974476487a523614dcff7b0a77..7f7af3bdef063ef124c90ddefb5940120febfd9f 100644 (file)
@@ -47,7 +47,7 @@ GCC 12, Clang 15, and other pre-2023 C compilers.
 Some platforms define @code{nullptr_t} even when @code{<stddef.h>} is
 not included:
 @c https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869
-GCC 14.0.1 20240411 (Red Hat 14.0.1-0).
+GCC 14
 
 @item
 Some platforms provide an @code{offsetof} macro that cannot be used in
index 3e4a8ec603274e9ce5bcd3d2e904c4aff56172d0..dc689b8df80646b83d27c0671639fc560a995652 100644 (file)
@@ -31,7 +31,7 @@
      || defined __need_ptrdiff_t || defined __need_NULL             \
      || defined __need_wint_t)                                      \
     /* Avoid warning triggered by "gcc -std=gnu23 -Wsystem-headers" \
-       in Fedora 40 with gcc 14.0.1.                                \
+       in GCC 13.3 and 14.2                                         \
        <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870>.  */   \
     && !@STDDEF_NOT_IDEMPOTENT@
 /* Special invocation convention inside gcc header files.  In
index a6bc62431432611d9e27c82cc685937fe37f99f8..5011bcd8d1f8943642d772f87f7574b8ab8d0a18 100644 (file)
@@ -1,5 +1,5 @@
 # stddef_h.m4
-# serial 19
+# serial 20
 dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -91,12 +91,14 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
   fi
 
   dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870
-  dnl affects GCC 13 and 14.
+  dnl affects GCC 13.3 and 14.2.
   AC_CACHE_CHECK([whether <stddef.h> is idempotent],
     [gl_cv_stddef_idempotent],
     [AC_COMPILE_IFELSE([AC_LANG_SOURCE(
        [[
-       #if __GNUC__ == 13 || __GNUC__ == 14
+       #if \
+           ((__GNUC__ == 13 && __GNUC_MINOR <= 3) \
+            || (__GNUC__ == 14 && __GNUC_MINOR <= 2))
         #error "bug 114870 is present"
        #endif
        ]])],