From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs-26 9e59de9: Use GCALIGNED properly for GCC Date: Fri, 10 Nov 2017 11:57:58 +0200 Message-ID: <83shdmpiah.fsf@gnu.org> References: <20171109031206.7056.28312@vcs0.savannah.gnu.org> <20171109031208.D2CAF2033E@vcs0.savannah.gnu.org> <5A0550FE.2030703@gmx.at> <83zi7upnfo.fsf@gnu.org> <4ee60712-789e-f160-52a9-4e24a9733a11@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1510307893 27953 195.159.176.226 (10 Nov 2017 09:58:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Nov 2017 09:58:13 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org, rgm@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 10 10:58:07 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eD64d-0006xv-GY for ged-emacs-devel@m.gmane.org; Fri, 10 Nov 2017 10:58:07 +0100 Original-Received: from localhost ([::1]:40851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eD64k-0000l5-Ow for ged-emacs-devel@m.gmane.org; Fri, 10 Nov 2017 04:58:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eD64c-0000jz-L6 for emacs-devel@gnu.org; Fri, 10 Nov 2017 04:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eD64Y-0002n3-4w for emacs-devel@gnu.org; Fri, 10 Nov 2017 04:58:06 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eD64Y-0002mi-1b; Fri, 10 Nov 2017 04:58:02 -0500 Original-Received: from [176.228.60.248] (port=3616 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eD64W-0003eG-Jl; Fri, 10 Nov 2017 04:58:01 -0500 In-reply-to: <4ee60712-789e-f160-52a9-4e24a9733a11@cs.ucla.edu> (message from Paul Eggert on Fri, 10 Nov 2017 00:26:19 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220022 Archived-At: > Cc: rgm@gnu.org, emacs-devel@gnu.org > From: Paul Eggert > 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.