diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-02-07 13:02:02 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-02-07 16:52:07 -0800 |
| commit | 0e4883f18eecea59e537e2368a0f5674888a1af7 (patch) | |
| tree | 1b2ee8c04982d609e58ebfca05e4c2a0242ed231 /lib | |
| parent | 93206cbcea31add3da76cc1025b2f148312fe6f1 (diff) | |
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/attribute.h | 8 | ||||
| -rw-r--r-- | lib/flexmember.h | 7 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 20 | ||||
| -rw-r--r-- | lib/intprops.h | 8 |
4 files changed, 28 insertions, 15 deletions
diff --git a/lib/attribute.h b/lib/attribute.h index 4939d776e72..625195c8565 100644 --- a/lib/attribute.h +++ b/lib/attribute.h @@ -257,7 +257,9 @@ because the function need not return exactly once and can depend on state addressed by its arguments.) See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and - <https://stackoverflow.com/questions/76847905/>. */ + <https://stackoverflow.com/questions/76847905/>. + ATTENTION! Efforts are underway to change the meaning of this attribute. + See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>. */ /* Applies to: functions, pointer to functions, function type. */ #define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED @@ -284,7 +286,9 @@ because the function need not return exactly once and can affect state addressed by its arguments.) See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and - <https://stackoverflow.com/questions/76847905/>. */ + <https://stackoverflow.com/questions/76847905/>. + ATTENTION! Efforts are underway to change the meaning of this attribute. + See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>. */ /* Applies to: functions, pointer to functions, function type. */ #define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE diff --git a/lib/flexmember.h b/lib/flexmember.h index 15ee4f5e281..b4d86c29fb5 100644 --- a/lib/flexmember.h +++ b/lib/flexmember.h @@ -28,11 +28,12 @@ #include <stddef.h> /* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below. - On older platforms without _Alignof, use a pessimistic bound that is + If _Alignof might not exist or might not work correctly on + structs with flexible array members, use a pessimistic bound that is safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1. - On newer platforms, use _Alignof to get a tighter bound. */ + Otherwise, use _Alignof to get a tighter bound. */ -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 || defined _Alignof # define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1)) #else # define FLEXALIGNOF(type) _Alignof (type) diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 22d102b1d86..fa2250cf686 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -281,7 +281,6 @@ EXECINFO_H = @EXECINFO_H@ EXEEXT = @EXEEXT@ FILE_HAS_ACL_LIB = @FILE_HAS_ACL_LIB@ FIND_DELETE = @FIND_DELETE@ -FIRSTFILE_OBJ = @FIRSTFILE_OBJ@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FONT_OBJ = @FONT_OBJ@ @@ -960,7 +959,6 @@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_XSERVER = @HAVE_XSERVER@ HAVE__EXIT = @HAVE__EXIT@ -HYBRID_MALLOC = @HYBRID_MALLOC@ IEEE754_H = @IEEE754_H@ IMAGEMAGICK_CFLAGS = @IMAGEMAGICK_CFLAGS@ IMAGEMAGICK_LIBS = @IMAGEMAGICK_LIBS@ @@ -1137,7 +1135,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PAXCTL = @PAXCTL@ PAXCTL_dumped = @PAXCTL_dumped@ PAXCTL_notdumped = @PAXCTL_notdumped@ PGTK_LIBS = @PGTK_LIBS@ @@ -1147,10 +1144,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ -POST_ALLOC_OBJ = @POST_ALLOC_OBJ@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ -PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ @@ -1388,7 +1383,6 @@ TREE_SITTER_LIBS = @TREE_SITTER_LIBS@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ -UNEXEC_OBJ = @UNEXEC_OBJ@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ @@ -1501,10 +1495,16 @@ gl_GNULIB_ENABLED_verify_CONDITION = @gl_GNULIB_ENABLED_verify_CONDITION@ gl_LIBOBJDEPS = @gl_LIBOBJDEPS@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ +gl_libgnu_LIBOBJDEPS = @gl_libgnu_LIBOBJDEPS@ +gl_libgnu_LIBOBJS = @gl_libgnu_LIBOBJS@ +gl_libgnu_LTLIBOBJS = @gl_libgnu_LTLIBOBJS@ gltests_LIBOBJDEPS = @gltests_LIBOBJDEPS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ +gltests_libgnu_LIBOBJDEPS = @gltests_libgnu_LIBOBJDEPS@ +gltests_libgnu_LIBOBJS = @gltests_libgnu_LIBOBJS@ +gltests_libgnu_LTLIBOBJS = @gltests_libgnu_LTLIBOBJS@ gsettingsschemadir = @gsettingsschemadir@ host = @host@ host_alias = @host_alias@ @@ -1552,9 +1552,9 @@ x_default_search_path = @x_default_search_path@ noinst_LIBRARIES += libgnu.a libgnu_a_SOURCES = -libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) -libgnu_a_LIBADD = $(gl_LIBOBJS) -libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) +libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) $(GL_CFLAG_ALLOW_WARNINGS) +libgnu_a_LIBADD = $(gl_libgnu_LIBOBJS) +libgnu_a_DEPENDENCIES = $(gl_libgnu_LIBOBJS) EXTRA_libgnu_a_SOURCES = ## begin gnulib module absolute-header @@ -4446,5 +4446,5 @@ mostlyclean-local: mostlyclean-generic : distclean-local: distclean-gnulib-libobjs distclean-gnulib-libobjs: - -rm -f @gl_LIBOBJDEPS@ + -rm -f @gl_libgnu_LIBOBJDEPS@ maintainer-clean-local: distclean-gnulib-libobjs diff --git a/lib/intprops.h b/lib/intprops.h index 92dfef2500a..83efe39910a 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -34,6 +34,14 @@ signed or floating type. Do not evaluate E. */ #define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e) +/* The same value as as the arithmetic expression E, but with E's type + after integer promotions. For example, if E is of type 'enum {A, B}' + then 'switch (INT_PROMOTE (E))' pacifies gcc -Wswitch-enum if some + enum values are deliberately omitted from the switch's cases. + Here, unary + is safer than a cast or inline function, as unary + + does only integer promotions. */ +#define INT_PROMOTE(e) (+ (e)) + /* Minimum and maximum values for integer types and expressions. */ |
