From: Bruno Haible Date: Sat, 9 May 2020 11:14:24 +0000 (+0200) Subject: Remove redundant definitions of _GL_ATTRIBUTE_ALLOC_SIZE. X-Git-Tag: v1.0~4114 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=7dc2704acc113493518945b2f751dfb2882a698a;p=gnulib.git Remove redundant definitions of _GL_ATTRIBUTE_ALLOC_SIZE. Reported by Akim Demaille in . * lib/eealloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Remove macro. * lib/pagealign_alloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise. * lib/xalloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 7f19e4e984..dff097df28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2020-05-09 Bruno Haible + + Remove redundant definitions of _GL_ATTRIBUTE_ALLOC_SIZE. + Reported by Akim Demaille in + . + * lib/eealloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Remove macro. + * lib/pagealign_alloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise. + * lib/xalloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise. + 2020-05-09 Bruno Haible stdio, monetary: Don't redefine _GL_ATTRIBUTE_FORMAT. diff --git a/lib/eealloc.h b/lib/eealloc.h index 351cbedff6..328268ef38 100644 --- a/lib/eealloc.h +++ b/lib/eealloc.h @@ -39,13 +39,6 @@ _GL_INLINE_HEADER_BEGIN # define EEALLOC_INLINE _GL_INLINE #endif -#if ! defined __clang__ && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - #if MALLOC_0_IS_NONNULL # define eemalloc malloc #else diff --git a/lib/pagealign_alloc.h b/lib/pagealign_alloc.h index 1459ec4321..393eb18d6a 100644 --- a/lib/pagealign_alloc.h +++ b/lib/pagealign_alloc.h @@ -20,13 +20,6 @@ # include -#if ! defined __clang__ && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - /* Allocate a block of memory of SIZE bytes, aligned on a system page boundary. If SIZE is not a multiple of the system page size, it will be rounded up diff --git a/lib/xalloc.h b/lib/xalloc.h index 19c64acb41..24273ffbe3 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -36,13 +36,6 @@ extern "C" { #endif -#if ! defined __clang__ && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the