[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 9d56a21: Merge from gnulib
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 9d56a21: Merge from gnulib |
Date: |
Tue, 07 Apr 2015 04:47:37 +0000 |
branch: master
commit 9d56a21e6a696ad19ac65c4b405aeca44785884a
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Merge from gnulib
* lib/stddef.in.h: Update from gnulib, incorporating:
2015-04-02 stddef: port to pre-C11 GCC on x86
---
ChangeLog | 6 ++++++
lib/stddef.in.h | 19 +++++++++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 70ab50c..6e2b4fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-07 Paul Eggert <address@hidden>
+
+ Merge from gnulib
+ * lib/stddef.in.h: Update from gnulib, incorporating:
+ 2015-04-02 stddef: port to pre-C11 GCC on x86
+
2015-04-03 Paul Eggert <address@hidden>
Port 'configure' to clang 3.5
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index 44db241..698307b 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -83,12 +83,23 @@
/* Some platforms lack max_align_t. */
#if address@hidden@
+/* On the x86, the maximum storage alignment of double, long, etc. is 4,
+ but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
+ and the C11 standard allows this. Work around this problem by
+ using __alignof__ (which returns 8 for double) rather than _Alignof
+ (which returns 4), and align each union member accordingly. */
+# ifdef __GNUC__
+# define _GL_STDDEF_ALIGNAS(type) \
+ __attribute__ ((__aligned__ (__alignof__ (type))))
+# else
+# define _GL_STDDEF_ALIGNAS(type) /* */
+# endif
typedef union
{
- char *__p;
- double __d;
- long double __ld;
- long int __i;
+ char *__p _GL_STDDEF_ALIGNAS (char *);
+ double __d _GL_STDDEF_ALIGNAS (double);
+ long double __ld _GL_STDDEF_ALIGNAS (long double);
+ long int __i _GL_STDDEF_ALIGNAS (long int);
} max_align_t;
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 9d56a21: Merge from gnulib,
Paul Eggert <=