x86_64: Should the -mavx* options affected __alignof__ (max_align_t)?
Andrew Haley
aph@redhat.com
Thu Apr 2 16:23:00 GMT 2015
On 04/02/2015 12:43 PM, Florian Weimer wrote:
>
> But it is dubious to require that, say, strdup ("example") returns a
> pointer which is 16-byte-aligned, too.
>
> What is missing, it seems to me, is the qualification that for the
> pointer returned by malloc, the alignment requirements only of those
> types whose size does not exceed the malloc argument argument need to be
> considered.
I'm trying to guess how you'd write a strictly-conforming program that
could tell the difference. (Casting to an integer and looking at the
low-order bits doesn't count because the mapping from a pointer to an
integer is not well-defined.)
Andrew.
More information about the Gcc
mailing list