This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Make max_align_t respect _Float128
On Mon, 29 Aug 2016, Marek Polacek wrote:
> On Fri, Aug 26, 2016 at 02:51:38PM -0700, Paul Eggert wrote:
> > > Well, the patch could use __SIZEOF_FLOAT128__ just as well as __i386__
> > > (the effect would be an extra union member
> >
> > s/union/struct/. Though I've always wondered why it is a struct and not a
> > union. Maybe change it to union while we're doing an ABI change anyway?
>
> Yeah, me too. The initial implementation is here
> <https://gcc.gnu.org/ml/gcc-patches/2011-11/msg00841.html> but I don't see any
> comments wrt max_align_t being a struct or a union there.
I'm not aware of a specific reason for struct versus union (naming via a
typedef without a struct tag, so that no identifiers from the tag
namespace are used for C and so that the name for linkage purposes in C++
is max_align_t, is deliberate, however).
While the chance of any code's ABI being affected by the size of the type
should be small, the minimum change is certainly the one that uses
__i386__ and so doesn't affect the type at all except in the case where
it's necessary to do so.
--
Joseph S. Myers
joseph@codesourcery.com