Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 5 May 2014 00:10:53 -0400
From: Rich Felker <dalias@...c.org>
To: Khem Raj <raj.khem@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH] add definition of max_align_t to stddef.h

On Sun, May 04, 2014 at 06:02:36PM -0700, Khem Raj wrote:
> On Sun, May 4, 2014 at 4:42 AM, PaweĊ‚ Dziepak <pdziepak@...rnos.org> wrote:
> >> Is there a bug filed against gcc yet?
> >
> > The behavior in GCC 4.9 has changed. _Alignof(long long) now is always
> > 4. _Alignof(max_align_t) remains 8 though. Because of this, the
> > solution I proposed in earlier post doesn't work anymore
> > (_Alignof(max_align_t) would be 4 if GCC 4.9 didn't complain that
> > _Alignas(long long) reduces alignment of long long which is weird but
> > probably doesn't matters much in this discussion) and I looks like the
> > only option is to use __attribute__((__aligned__(...))). I don't think
> > there is reason for me to send another version of this patch since
> > there has already been sent a patch which defines max_align_t in such
> > way.
> 
> yes and I think we have to care for few gcc versions gcc 4.9 is pretty
> new we should still support older gcc versions.

Could you clarify what you mean by this? Why is a union containing
long long and long double not sufficient? It should give the correct
result on all GCC versions including buggy ones (4 on i386).

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.