summaryrefslogtreecommitdiff
path: root/src/emacs-module.h.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-01-22 11:47:22 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-01-22 12:02:56 -0800
commitb99ec5d5b11154bafb193ceaaac6976daafe3f82 (patch)
tree4cf3bac2b3686f6b8235c302bcb171cdd45b7cb8 /src/emacs-module.h.in
parenta900e641fa1fd765799f12a7f699f768ebfccfe8 (diff)
downloademacs-b99ec5d5b11154bafb193ceaaac6976daafe3f82.tar.gz
emacs-b99ec5d5b11154bafb193ceaaac6976daafe3f82.tar.bz2
emacs-b99ec5d5b11154bafb193ceaaac6976daafe3f82.zip
Work around __has_attribute bug in clang 3.4
* src/conf_post.h (HAS_ATTRIBUTE): * src/emacs-module.h.in (EMACS_ATTRIBUTE_NONNULL): Port to clang 3.4 and earlier.
Diffstat (limited to 'src/emacs-module.h.in')
-rw-r--r--src/emacs-module.h.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/emacs-module.h.in b/src/emacs-module.h.in
index 2989b439109..fe52587c1a5 100644
--- a/src/emacs-module.h.in
+++ b/src/emacs-module.h.in
@@ -51,7 +51,9 @@ information how to write modules and use this header file.
#if 3 < __GNUC__ + (3 <= __GNUC_MINOR__)
# define EMACS_ATTRIBUTE_NONNULL(...) \
__attribute__ ((__nonnull__ (__VA_ARGS__)))
-#elif defined __has_attribute
+#elif (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
# if __has_attribute (__nonnull__)
# define EMACS_ATTRIBUTE_NONNULL(...) \
__attribute__ ((__nonnull__ (__VA_ARGS__)))