From: Paul Eggert Date: Sat, 2 Apr 2016 04:01:17 +0000 (-0700) Subject: stddef: support configuring with g++ X-Git-Tag: v1.0~6773 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=aeed3a25033b0a2ccc35bfed01488b69d0374e28;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index ca6c36be37..ef7629f9e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-04-01 Paul Eggert + + 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 test-framework-sh: minor cleanups diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 2beb7f5701..0e75b9c5b3 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -81,8 +81,10 @@ # 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