X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/88bc8332eb14bcc4780fd3fe3dd4de2205c31dbf..5fbd17e369ca30a47ab8a2eda0b2f2ea9b690bb4:/src/conf_post.h diff --git a/src/conf_post.h b/src/conf_post.h index 479d044877..1a080fad63 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -245,7 +245,9 @@ extern void _DebPrint (const char *fmt, ...); # define ATTRIBUTE_MALLOC #endif -#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) +#if (__clang__ \ + ? __has_attribute (alloc_size) \ + : 4 < __GNUC__ + (3 <= __GNUC_MINOR__)) # define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) #else # define ATTRIBUTE_ALLOC_SIZE(args)