This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x86_64: Should the -mavx* options affected __alignof__ (max_align_t)?
- From: Andrew Haley <aph at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Thu, 02 Apr 2015 09:57:50 +0100
- Subject: Re: x86_64: Should the -mavx* options affected __alignof__ (max_align_t)?
- Authentication-results: sourceware.org; auth=none
- References: <55105B5B dot 50107 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1503231831300 dot 14930 at digraph dot polyomino dot org dot uk> <55105E53 dot 8020002 at redhat dot com> <551CFD38 dot 9040200 at redhat dot com> <551D0060 dot 1020805 at redhat dot com> <551D01E5 dot 9070405 at redhat dot com>
On 04/02/2015 09:46 AM, Florian Weimer wrote:
> On 04/02/2015 10:40 AM, Andrew Haley wrote:
>
>> So, max_align_t is an object type, and therefore malloc returns a
>> pointer suitable for max_align_t.
>
> Then the GCC definition of max_align_t is incorrect, it should be 8 on
> x86_64 GNU/Linux, because traditionally, that's what mallocs implement
> for this architecture. (dlmalloc in glibc is an exception.)
Or the libcs are wrong; one or the other.
Andrew.