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: Eli Zaretskii
Subject: Re: emacs-26 9e59de9: Use GCALIGNED properly for GCC
Date: Fri, 10 Nov 2017 11:57:58 +0200

> Cc: address@hidden, address@hidden
> From: Paul Eggert <address@hidden>
> Date: Fri, 10 Nov 2017 00:26:19 -0800
> 
> I have thought of a solution that fixes the problem by dropping use of 
> GCALIGNED 
> and instead using classic C unions along with 'char alignas (8)'. The idea is 
> to 
> gcalign a 'struct foo' this way:
> 
>     union gcaligned_foo { struct foo s; char alignas (8) gcaligned; };

Wouldn't it be more reliable to use something like

  union gcaligned_foo { struct foo s; int64_t gcaligned; };

IOW, should we rely on alignas?  There could be dragons there too, no?

> Something like this should work on all platforms that Emacs ports to. I plan 
> to 
> work on a first cut tomorrow.

Thanks.



reply via email to

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