]> Savannah Git Hosting - gnulib.git/commit
stddef: port to pre-C11 GCC on x86
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Apr 2015 17:35:53 +0000 (10:35 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Apr 2015 17:36:37 +0000 (10:36 -0700)
commite2e66692cd072a39ce26ecf94117f934008aab24
treeb79c5b49c2d065f753f74a1307a64d677ac43118
parent106a3866d01f9dd57ab4f10dbeb0d5a8db73a9f7
stddef: port to pre-C11 GCC on x86

On this platform, max_align_t should have an alignment of 8 even
though the storage alignments of double, long, etc. max out at 4.
Inspired by a comment of Andreas Schwab's here:
https://sourceware.org/ml/libc-alpha/2015-04/msg00017.html
* lib/stddef.in.h (_GL_STDDEF_ALIGNAS) [!HAVE_MAX_ALIGN_T]: New macro.
(max_align_t) [!HAVE_MAX_ALIGN_T]: Use it.
* tests/test-stddef.c: Test __alignof__ too, if available.
ChangeLog
lib/stddef.in.h
tests/test-stddef.c