[PATCH] 69759 - document __builtin_alloca and __builtin_alloca_with_align

Martin Sebor msebor@gmail.com
Tue Feb 16 03:19:00 GMT 2016


On 02/15/2016 04:18 PM, Joseph Myers wrote:
> The description here is self-contradictory; __BIGGEST_ALIGNMENT__ bytes is
> often different from the greatest fundamental alignment (fundamental
> alignments and max_align_t only consider standard C types,
> __BIGGEST_ALIGNMENT__ can allow for e.g. vector type extensions).

Thank you for reviewing the patch.  You're right that I conflated
fundamental alignment with the strictest alignment.  I've adjusted
the description to make a distinction between __BIGGEST_ALIGNMENT__
and _Alignof(max_align_t) since they, as you point out, need not be
the same (for example on i386 Linux with GLIBC I see that the former
is 16 while the latter 8, which is correct because on GLIBC's malloc
returns 8-byte aligned pointers).  I've also fixed a few typos and
made additional adjustments to reflect the fixes in my patch for
bug 69780 that I anticipate committing later this week.

That said, I think it's worth pointing out that max_align_t has
nothing to do with standard C types.  The intent of the type is
to expose a type with the strictest alignment supported by
an implementation for an object of any type and with any storage
duration, not the alignment of the most strictly aligned basic
(or fundamental) type.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-69759.patch
Type: text/x-patch
Size: 5249 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160216/b186a905/attachment.bin>


More information about the Gcc-patches mailing list