]> code.delx.au - gnu-emacs/blobdiff - src/conf_post.h
* conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
[gnu-emacs] / src / conf_post.h
index 479d0448775c610c35c15d73148b77b88a7c8e6d..1a080fad635ae762ac92436bfd1a5757ac3d5370 100644 (file)
@@ -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)