]> git.eshelyaron.com Git - emacs.git/commitdiff
Update from Gnulib by running admin/merge-gnulib
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 8 May 2025 06:57:18 +0000 (23:57 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sat, 10 May 2025 08:54:54 +0000 (10:54 +0200)
The following changes were made by hand,
so that admin/merge-gnulib could succeed
instead of failing because the diff didn’t match.
* admin/gnulib-patches/lib/getloadavg.c.diff:
Remove, as it is no longer needed now that recent
Gnulib has been merged.
* admin/merge-gnulib (GNULIB_TOOL_FLAGS):
Remove the --local-dir="$src"admin/gnulib-patches option,
as it is no longer needed either.

(cherry picked from commit c9c6abfa81c58b4a62f4fa5fcaad94b219f5d706)

14 files changed:
admin/gnulib-patches/lib/getloadavg.c.diff [deleted file]
admin/merge-gnulib
lib/attribute.h
lib/cdefs.h
lib/diffseq.h
lib/getloadavg.c
lib/gnulib.mk.in
lib/stddef.in.h
lib/stdlib.in.h
lib/string.in.h
lib/utimensat.c
m4/gnulib-common.m4
m4/manywarnings.m4
m4/stddef_h.m4

diff --git a/admin/gnulib-patches/lib/getloadavg.c.diff b/admin/gnulib-patches/lib/getloadavg.c.diff
deleted file mode 100644 (file)
index afa6337..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/lib/getloadavg.c b/lib/getloadavg.c
-index 9da41c16c02..1cb1c01097d 100644
---- a/lib/getloadavg.c
-+++ b/lib/getloadavg.c
-@@ -499,7 +499,8 @@ getloadavg (double loadavg[], int nelem)
-   }
- # endif
--# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__)
-+# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \
-+  && (!defined __ANDROID__ || __ANDROID_API__ >= 13)
-                                       /* Linux without glibc, Android, Cygwin */
- #  define LDAV_DONE
- #  undef LOAD_AVE_TYPE
index 88f74d6eb7f6d55c14ec2bb85cb363431d68624e..54dcf275d55a529a53925cf567809301e1d1b6ae 100755 (executable)
@@ -80,10 +80,6 @@ case $src in
   *) src=$src/ ;;
 esac
 
-GNULIB_TOOL_FLAGS="$GNULIB_TOOL_FLAGS
-  --local-dir="$src"admin/gnulib-patches
-"
-
 # Gnulib's source directory.
 gnulib_srcdir=${1-$src../gnulib}
 
index 625195c8565c26b903eb62b829700f78a705535c..ae7bbe8e2cb939866e17c9c922e0bc7d17664d9c 100644 (file)
    _GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF,
    _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
    _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
-   _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
-   _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_REPRODUCIBLE,
-   _GL_ATTRIBUTE_RETURNS_NONNULL, _GL_ATTRIBUTE_SENTINEL,
-   _GL_ATTRIBUTE_UNSEQUENCED.  */
+   _GL_ATTRIBUTE_NONNULL_IF_NONZERO, _GL_ATTRIBUTE_NONSTRING,
+   _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE,
+   _GL_ATTRIBUTE_REPRODUCIBLE, _GL_ATTRIBUTE_RETURNS_NONNULL,
+   _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNSEQUENCED.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
 /* Applies to: functions.  */
 #define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL (args)
 
+/* ATTRIBUTE_NONNULL_IF_NONZERO (NP, NI) - Argument NP (a pointer)
+   must not be NULL if the argument NI (an integer) is != 0.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_NONNULL_IF_NONZERO(np, ni) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (np, ni)
+
+
 /* The function's return value is a non-NULL pointer.  */
 /* Applies to: functions.  */
 #define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL
index 53269033d9d78b631f85e418c28b2c4346d76b70..65da09dc09679a7a56d0c75ded9bad20137f0f31 100644 (file)
    run in pedantic mode if the uses are carefully marked using the
    `__extension__' keyword.  But this is not generally available before
    version 2.8.  */
-#if !(__GNUC_PREREQ (2,8) || defined __clang__)
+#if ! (__GNUC_PREREQ (2,8) || defined __clang__ || 0x5150 <= __SUNPRO_C)
 # define __extension__         /* Ignore */
 #endif
 
index 8a823f98ea025eafcca3aa4c056924819e5bc861..914bc643bb4b09195ac387fffcc24fef42eb9ac1 100644 (file)
      #include "minmax.h"
  */
 
+/* This file uses _GL_GNUC_PREREQ.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Maximum value of type OFFSET.  */
 #ifndef OFFSET_MAX
 # define OFFSET_MAX \
@@ -93,7 +98,7 @@
 #endif
 
 /* Suppress gcc's "...may be used before initialized" warnings,
-   generated by GCC versions up to at least GCC 14.2.
+   generated by GCC versions up to at least GCC 15.1.
    Likewise for gcc -fanalyzer's "use of uninitialized value" warnings.  */
 #if _GL_GNUC_PREREQ (4, 7)
 # pragma GCC diagnostic push
index 1cb1c01097dde7275d73ce00a5918b57bd2a9d95..752ec1f5ae7071c6f699f2d9fe0a5ac87ee50623 100644 (file)
 #  define SUNOS_5
 # endif
 
-# if defined (__osf__) && (defined (__alpha) || defined (__alpha__))
+# if defined (__osf__) && defined (__alpha)
 #  define OSF_ALPHA
 #  include <sys/mbuf.h>
 #  include <sys/socket.h>
@@ -499,9 +499,9 @@ getloadavg (double loadavg[], int nelem)
   }
 # endif
 
-# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \
-  && (!defined __ANDROID__ || __ANDROID_API__ >= 13)
-                                      /* Linux without glibc, Android, Cygwin */
+# if (!defined LDAV_DONE \
+      && (defined __ANDROID__ ? 13 <= __ANDROID_API__ : defined __linux__))
+                    /* non-Android Linux without glibc, Android 3.2+, Cygwin */
 #  define LDAV_DONE
 #  undef LOAD_AVE_TYPE
 
@@ -514,7 +514,7 @@ getloadavg (double loadavg[], int nelem)
     loadavg[2] = info.loads[2] / (double)(1U << SI_LOAD_SHIFT);
     elem = 3;
   }
-# endif /* __linux__ || __ANDROID__ */
+# endif /* __ANDROID__ ? 13 <= __ANDROID_API__ : __linux__ */
 
 # if !defined (LDAV_DONE) && defined __CYGWIN__
                                       /* Cygwin */
index cf7d0470f67e44369ce84060613bec83554afc72..fb34cf2cc1dcdacc1c97bf3d7f0aafa37f49216e 100644 (file)
@@ -22,7 +22,6 @@
 # Generated by gnulib-tool.
 # Reproduce by:
 # gnulib-tool --import \
-#  --local-dir=./admin/gnulib-patches \
 #  --lib=libgnu \
 #  --source-base=lib \
 #  --m4-base=m4 \
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 dbe8ebc850290d5d57b1193c773c622b2ce32080..1342db4877245934ec5276317382e91fc0ce8c14 100644 (file)
@@ -168,6 +168,18 @@ _GL_INLINE_HEADER_BEGIN
 # endif
 #endif
 
+/* _GL_ATTRIBUTE_NONNULL_IF_NONZERO (NP, NI) declares that the argument NP
+   (a pointer) must not be NULL if the argument NI (an integer) is != 0.  */
+/* Applies to: functions.  */
+#ifndef _GL_ATTRIBUTE_NONNULL_IF_NONZERO
+# if __GNUC__ >= 15 && !defined __clang__
+#  define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni) \
+     __attribute__ ((__nonnull_if_nonzero__ (np, ni)))
+# else
+#  define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni)
+# endif
+#endif
+
 /* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
  */
 #ifndef _GL_ATTRIBUTE_NOTHROW
@@ -223,6 +235,18 @@ _GL_INLINE_HEADER_BEGIN
 #endif
 
 
+/* Declarations for ISO C N3322.  */
+#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
+_GL_EXTERN_C void *bsearch (const void *__key,
+                            const void *__base, size_t __nmemb, size_t __size,
+                            int (*__compare) (const void *, const void *))
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
+_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
+                         int (*__compare) (const void *, const void *))
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2) _GL_ARG_NONNULL ((4));
+#endif
+
+
 #if @GNULIB__EXIT@
 /* Terminate the current process with the given return code, without running
    the 'atexit' handlers.  */
@@ -1182,7 +1206,8 @@ typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *);
 _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
                                   _gl_qsort_r_compar_fn compare,
                                   void *arg),
-                                 _GL_ARG_NONNULL ((1, 4)));
+                                 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
+                                 _GL_ARG_NONNULL ((4)));
 _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
                                   _gl_qsort_r_compar_fn compare,
                                   void *arg));
@@ -1191,7 +1216,8 @@ _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
                                   _gl_qsort_r_compar_fn compare,
                                   void *arg),
-                                 _GL_ARG_NONNULL ((1, 4)));
+                                 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
+                                 _GL_ARG_NONNULL ((4)));
 #  endif
 _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
                                   _gl_qsort_r_compar_fn compare,
index 44b9497d8021f4063b2dde2bd8a036567be0275d..e7642211685c537d0750a6b1c2dd5cdb023279f1 100644 (file)
 # endif
 #endif
 
+/* _GL_ATTRIBUTE_NONNULL_IF_NONZERO (NP, NI) declares that the argument NP
+   (a pointer) must not be NULL if the argument NI (an integer) is != 0.  */
+/* Applies to: functions.  */
+#ifndef _GL_ATTRIBUTE_NONNULL_IF_NONZERO
+# if __GNUC__ >= 15 && !defined __clang__
+#  define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni) \
+     __attribute__ ((__nonnull_if_nonzero__ (np, ni)))
+# else
+#  define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni)
+# endif
+#endif
+
 /* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
  */
 #ifndef _GL_ATTRIBUTE_NOTHROW
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
+
 /* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though <stdlib.h> may not have
    been included yet.  */
 #if @GNULIB_FREE_POSIX@
@@ -198,6 +211,44 @@ _GL_EXTERN_C void free (void *);
 # endif
 #endif
 
+
+/* Declarations for ISO C N3322.  */
+#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
+_GL_EXTERN_C void *memcpy (void *__dest, const void *__src, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
+_GL_EXTERN_C void *memccpy (void *__dest, const void *__src, int __c, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 4)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 4);
+_GL_EXTERN_C void *memmove (void *__dest, const void *__src, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
+_GL_EXTERN_C char *strncpy (char *__dest, const char *__src, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
+_GL_EXTERN_C char *strndup (const char *__s, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2);
+_GL_EXTERN_C char *strncat (char *__dest, const char *__src, size_t __n)
+  _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
+_GL_EXTERN_C int memcmp (const void *__s1, const void *__s2, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
+_GL_EXTERN_C int strncmp (const char *__s1, const char *__s2, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
+# ifndef __cplusplus
+_GL_EXTERN_C void *memchr (const void *__s, int __c, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
+_GL_EXTERN_C void *memrchr (const void *__s, int __c, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
+# endif
+_GL_EXTERN_C void *memset (void *__s, int __c, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
+_GL_EXTERN_C void *memset_explicit (void *__s, int __c, size_t __n)
+  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
+#endif
+
+
 /* Clear a block of memory.  The compiler will not delete a call to
    this function, even if the block is dead after the call.  */
 #if @GNULIB_EXPLICIT_BZERO@
@@ -215,6 +266,7 @@ _GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - "
 # endif
 #endif
 
+
 /* Find the index of the least-significant set bit.  */
 #if @GNULIB_FFSL@
 # if !@HAVE_FFSL@
@@ -281,7 +333,7 @@ _GL_CXXALIASWARN (memccpy);
 #  endif
 _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n),
                                   _GL_ATTRIBUTE_PURE
-                                  _GL_ARG_NONNULL ((1)));
+                                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3));
 _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
 # else
   /* On some systems, this function is defined as an overloaded function:
@@ -388,7 +440,7 @@ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
 # if ! @HAVE_DECL_MEMRCHR@
 _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t),
                                    _GL_ATTRIBUTE_PURE
-                                   _GL_ARG_NONNULL ((1)));
+                                   _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3));
 # endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C++" { const void * std::memrchr (const void *, int, size_t); }
@@ -425,12 +477,14 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
 #   define memset_explicit rpl_memset_explicit
 #  endif
 _GL_FUNCDECL_RPL (memset_explicit, void *,
-                  (void *__dest, int __c, size_t __n), _GL_ARG_NONNULL ((1)));
+                  (void *__dest, int __c, size_t __n),
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3));
 _GL_CXXALIAS_RPL (memset_explicit, void *, (void *__dest, int __c, size_t __n));
 # else
 #  if !@HAVE_MEMSET_EXPLICIT@
 _GL_FUNCDECL_SYS (memset_explicit, void *,
-                  (void *__dest, int __c, size_t __n), _GL_ARG_NONNULL ((1)));
+                  (void *__dest, int __c, size_t __n),
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3));
 #  endif
 _GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n));
 # endif
@@ -697,7 +751,8 @@ _GL_CXXALIASWARN (strdup);
 #  endif
 _GL_FUNCDECL_RPL (strncat, char *,
                   (char *restrict dest, const char *restrict src, size_t n),
-                  _GL_ARG_NONNULL ((1, 2)));
+                  _GL_ARG_NONNULL ((1))
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3));
 _GL_CXXALIAS_RPL (strncat, char *,
                   (char *restrict dest, const char *restrict src, size_t n));
 # else
@@ -724,7 +779,7 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (strndup, char *,
                   (char const *__s, size_t __n),
-                  _GL_ARG_NONNULL ((1))
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
                   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
 _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
 # else
@@ -733,13 +788,13 @@ _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
 #   if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
 _GL_FUNCDECL_SYS (strndup, char *,
                   (char const *__s, size_t __n),
-                  _GL_ARG_NONNULL ((1))
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
                   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE)
                   _GL_ATTRIBUTE_NOTHROW;
 #   else
 _GL_FUNCDECL_SYS (strndup, char *,
                   (char const *__s, size_t __n),
-                  _GL_ARG_NONNULL ((1))
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
                   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
 #   endif
 #  endif
@@ -752,13 +807,13 @@ _GL_CXXALIASWARN (strndup);
 #  if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
 _GL_FUNCDECL_SYS (strndup, char *,
                   (char const *__s, size_t __n),
-                  _GL_ARG_NONNULL ((1))
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
                   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE)
                   _GL_ATTRIBUTE_NOTHROW;
 #  else
 _GL_FUNCDECL_SYS (strndup, char *,
                   (char const *__s, size_t __n),
-                  _GL_ARG_NONNULL ((1))
+                  _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2)
                   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
 #  endif
 # endif
index ca1d39e59005828916719bbf79db0c8bd9e7bd13..fcf2d27eb3eb98e509a384f27630cd1d84864a5a 100644 (file)
@@ -118,7 +118,7 @@ rpl_utimensat (int fd, char const *file, struct timespec const times[2],
             ts[1] = times[1];
           times = ts;
         }
-#   if defined __hppa__ || defined __NetBSD__
+#   if defined __hppa || defined __NetBSD__
       /* Linux kernel 2.6.22.19 on hppa does not reject invalid tv_nsec
          values.
 
index daf05db2a4750ea306194581c95852814e84ebea..d5bf2fb358e7a210635c060e008c15e40d27248b 100644 (file)
@@ -1,5 +1,5 @@
 # gnulib-common.m4
-# serial 109
+# serial 110
 dnl Copyright (C) 2007-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,
@@ -117,6 +117,9 @@ AC_DEFUN([gl_COMMON_BODY], [
 #  define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
 # else
 #  define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
+/* The following lines list the first GCC version that supports the attribute.
+   Although the lines are not used in GCC 5 and later (as GCC 5 introduced
+   __has_attribute support), list GCC versions 5+ anyway for completeness.  */
 #  define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
 #  define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
 #  define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
@@ -137,14 +140,15 @@ AC_DEFUN([gl_COMMON_BODY], [
 #  endif
 #  define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
 #  define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
+#  define _GL_ATTR_nonnull_if_nonzero _GL_GNUC_PREREQ (15, 1)
 #  define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
 #  define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
 #  define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
 #  define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
-#  define _GL_ATTR_reproducible 0 /* not yet supported, as of GCC 14 */
+#  define _GL_ATTR_reproducible _GL_GNUC_PREREQ (15, 1)
 #  define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
 #  define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
-#  define _GL_ATTR_unsequenced 0 /* not yet supported, as of GCC 14 */
+#  define _GL_ATTR_unsequenced _GL_GNUC_PREREQ (15, 1)
 #  define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
 #  define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
 # endif
@@ -681,6 +685,17 @@ AC_DEFUN([gl_COMMON_BODY], [
 # endif
 #endif
 
+/* _GL_ATTRIBUTE_NONNULL_IF_NONZERO (NP, NI) declares that the argument NP
+   (a pointer) must not be NULL if the argument NI (an integer) is != 0.  */
+/* Applies to: functions.  */
+#ifndef _GL_ATTRIBUTE_NONNULL_IF_NONZERO
+# if _GL_HAS_ATTRIBUTE (nonnull_if_nonzero)
+#  define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni) __attribute__ ((__nonnull_if_nonzero__ (np, ni)))
+# else
+#  define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni)
+# endif
+#endif
+
 /* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is
    not meant to be NUL-terminated.  */
 /* Applies to: struct/union members and variables that are arrays of element
index cf3f730b4c3b5088498d9d8aeac3a15abde38817..eebba901806648504ddf3fd2ac79bac481c5b441 100644 (file)
@@ -97,7 +97,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
   # export LC_ALL=C && comm -3 \
   #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
   #     awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
-  #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
+  #  <(gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
 
   $1=
   for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
@@ -106,7 +106,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
     -Wbad-function-cast \
     -Wcast-align=strict \
     -Wdate-time \
-    -Wdisabled-optimization \
     -Wdouble-promotion \
     -Wduplicated-branches \
     -Wduplicated-cond \
index a6bc62431432611d9e27c82cc685937fe37f99f8..3bc8cd85fea38da8958083e37eacfd4b476db5e4 100644 (file)
@@ -1,5 +1,5 @@
 # stddef_h.m4
-# serial 19
+# serial 21
 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
        ]])],