>From 7dc2704acc113493518945b2f751dfb2882a698a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 9 May 2020 13:14:24 +0200 Subject: [PATCH 1/2] 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. --- ChangeLog | 9 +++++++++ lib/eealloc.h | 7 ------- lib/pagealign_alloc.h | 7 ------- lib/xalloc.h | 7 ------- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f19e4e..dff097d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 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. * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Don't override the definition that usually comes from m4/gnulib-common.m4. diff --git a/lib/eealloc.h b/lib/eealloc.h index 351cbed..328268e 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 1459ec4..393eb18 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 19c64ac..24273ff 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 -- 2.7.4