Commit ce5c361c authored by Paul Eggert's avatar Paul Eggert
Browse files

* conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.

Apparently clang removed support for the alloc_size attribute.
parent f6a27d26
2015-01-08 Paul Eggert <eggert@cs.ucla.edu>
 
* conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
Apparently clang removed support for the alloc_size attribute.
Port Qnil==0 XUNTAG to clang
clang has undefined behavior if the program subtracts an integer
from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in:
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment