emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-26 9e59de9: Use GCALIGNED properly for GCC


From: Stefan Monnier
Subject: Re: emacs-26 9e59de9: Use GCALIGNED properly for GCC
Date: Fri, 10 Nov 2017 13:02:57 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>> union gcaligned_foo { struct foo s; int64_t gcaligned; };
>> Are int64_t necessarily aligned on multiples of 8 on 32bit platforms?
> No, unfortunately.

That was my impression as well.

> That does not work either, alas, as C11 says 'alignas (8)' is an error when
> the natural alignment of the object is less than 8. This is one of the
> problems that we have encountered in earlier attempts to fix this bug. 'char
> alignas (8)' avoids this problem.

I don't follow: the natural alignment for `char` is definitely less than
8, so if "'alignas (8)' is an error when the natural alignment of the
object is less than 8", how can "char alignas (8)" avoid the problem?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]