aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-01-07 23:11:36 -0800
committerPaul Eggert2015-01-07 23:12:04 -0800
commitce5c361c14c3fd5c06d48aa1c4bfa05c47c249f0 (patch)
treee43119dce516e9a31875426bce85e3df742f7090 /src
parentf6a27d26dccdcc121bebc96fbf41f656fbf13138 (diff)
downloademacs-ce5c361c14c3fd5c06d48aa1c4bfa05c47c249f0.tar.gz
emacs-ce5c361c14c3fd5c06d48aa1c4bfa05c47c249f0.zip
* conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
Apparently clang removed support for the alloc_size attribute.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/conf_post.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 817483be1fb..7a98555cc9c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12015-01-08 Paul Eggert <eggert@cs.ucla.edu> 12015-01-08 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
4 Apparently clang removed support for the alloc_size attribute.
5
3 Port Qnil==0 XUNTAG to clang 6 Port Qnil==0 XUNTAG to clang
4 clang has undefined behavior if the program subtracts an integer 7 clang has undefined behavior if the program subtracts an integer
5 from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in: 8 from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in:
diff --git a/src/conf_post.h b/src/conf_post.h
index 479d0448775..1a080fad635 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -245,7 +245,9 @@ extern void _DebPrint (const char *fmt, ...);
245# define ATTRIBUTE_MALLOC 245# define ATTRIBUTE_MALLOC
246#endif 246#endif
247 247
248#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) 248#if (__clang__ \
249 ? __has_attribute (alloc_size) \
250 : 4 < __GNUC__ + (3 <= __GNUC_MINOR__))
249# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) 251# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
250#else 252#else
251# define ATTRIBUTE_ALLOC_SIZE(args) 253# define ATTRIBUTE_ALLOC_SIZE(args)