]> Savannah Git Hosting - gnulib.git/commitdiff
stddef: support configuring with g++
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Apr 2016 04:01:17 +0000 (21:01 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Apr 2016 04:01:47 +0000 (21:01 -0700)
Problem reported by Ángel González in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-04/msg00003.html
* lib/stddef.in.h (_GL_STDDEF_ALIGNAS, max_align_t):
Do not define if _GCC_MAX_ALIGN_T is defined.

ChangeLog
lib/stddef.in.h

index ca6c36be37a734fd7dd1827b80bd59a0b0e98a20..ef7629f9e0e3646f9fabc828f4801608fa26a316 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       stddef: support configuring with g++
+       Problem reported by Ángel González in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2016-04/msg00003.html
+       * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, max_align_t):
+       Do not define if _GCC_MAX_ALIGN_T is defined.
+
 2016-03-25  Paul Eggert  <eggert@cs.ucla.edu>
 
        test-framework-sh: minor cleanups
index 2beb7f5701a8253935974625ba7e4df7b53fdbee..0e75b9c5b36d9766b59b67c36886de4b69f2074e 100644 (file)
 # define wchar_t int
 #endif
 
-/* Some platforms lack max_align_t.  */
-#if !@HAVE_MAX_ALIGN_T@
+/* Some platforms lack max_align_t.  The check for _GCC_MAX_ALIGN_T is
+   a hack in case the configure-time test was done with g++ even though
+   we are currently compiling with gcc.  */
+#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
 /* 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