changeset 18401:23c452ef1bef

stdalign: correct mistake in alignof doc Problem reported by Joseph Myers in: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00340.html * doc/posix-headers/stdalign.texi: Do not imply that C11 prohibits alignof(S) where S is a structure containing a flexible array member. The Gnulib substitute does not support this, but C11 does.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 06 Sep 2016 14:26:05 -0700
parents 20e898a34a4e
children 55d5db124878
files ChangeLog doc/posix-headers/stdalign.texi
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Sep 05 21:40:57 2016 -0700
+++ b/ChangeLog	Tue Sep 06 14:26:05 2016 -0700
@@ -1,3 +1,12 @@
+2016-09-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdalign: correct mistake in alignof doc
+	Problem reported by Joseph Myers in:
+	https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00340.html
+	* doc/posix-headers/stdalign.texi: Do not imply that C11 prohibits
+	alignof(S) where S is a structure containing a flexible array
+	member.  The Gnulib substitute does not support this, but C11 does.
+
 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
 
 	main.mk: remove sc_program_name, since there is no more need to
--- a/doc/posix-headers/stdalign.texi	Mon Sep 05 21:40:57 2016 -0700
+++ b/doc/posix-headers/stdalign.texi	Tue Sep 06 14:26:05 2016 -0700
@@ -30,10 +30,9 @@
 which the operand can also be a unary expression, as with
 @code{sizeof}.  The Gnulib substitute does not support this extension.
 @item
-In ISO C11, the operand of @code{alignof}/@code{_Alignof} must be a
-complete type.  Recent versions of GCC support an extension in which
-the operand can also be structure type containing a flexible array
-member.  The Gnulib substitute does not support this extension.
+On most pre-C11 platforms, the operand of
+@code{alignof}/@code{_Alignof} cannot be a structure type containing a
+flexible array member.
 @item
 @code{_Alignas} and @code{alignas} are not always supported;
 on platforms lacking support, the