summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-12-16 17:29:33 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2014-12-18 12:49:13 -0800
commita8c75ca739fb9dec34645e497de94dc9ab5357f2 (patch)
treea14fe39db30ff9590d1894066b80494cf423151a /lib
parent7bf1097e7da9e75b72e879832fcec352a669b24f (diff)
downloadgnulib-a8c75ca739fb9dec34645e497de94dc9ab5357f2.tar.gz
stdalign: work around Apple GCC 4.0 bug
Reported by David Fang in: http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00194.html * lib/stdalign.in.h (_Alignas): * m4/stdalign.m4 (gl_STDALIGN_H): Do not use aligned attribute with GCC 4.0 on Apple.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdalign.in.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
index 32ae4c533e..dd25f0413d 100644
--- a/lib/stdalign.in.h
+++ b/lib/stdalign.in.h
@@ -95,7 +95,10 @@
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
# if defined __cplusplus && 201103 <= __cplusplus
# define _Alignas(a) alignas (a)
-# elif (__GNUC__ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
+# elif ((defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
|| __ICC || 0x5110 <= __SUNPRO_C)
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
# elif 1300 <= _MSC_VER