From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: emacs-26 9e59de9: Use GCALIGNED properly for GCC Date: Fri, 10 Nov 2017 18:11:49 +0000 Message-ID: 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> <83shdmpiah.fsf@gnu.org> <8d9c169a-5f58-6958-9fca-4c68fa547ba3@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e082db3585f36f3055da4db49" X-Trace: blaine.gmane.org 1510337580 27345 195.159.176.226 (10 Nov 2017 18:13:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Nov 2017 18:13:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 10 19:12:56 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 1eDDnT-0006rY-N9 for ged-emacs-devel@m.gmane.org; Fri, 10 Nov 2017 19:12:55 +0100 Original-Received: from localhost ([::1]:42948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDDna-0000SU-Oc for ged-emacs-devel@m.gmane.org; Fri, 10 Nov 2017 13:13:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDDmb-0000Qv-Ue for emacs-devel@gnu.org; Fri, 10 Nov 2017 13:12:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDDma-0007vw-UN for emacs-devel@gnu.org; Fri, 10 Nov 2017 13:12:01 -0500 Original-Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:53604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDDma-0007vb-Ph for emacs-devel@gnu.org; Fri, 10 Nov 2017 13:12:00 -0500 Original-Received: by mail-qk0-x233.google.com with SMTP id j202so2032472qke.10 for ; Fri, 10 Nov 2017 10:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fcvn+EBTPkyr1U40quS+QPEPDpsQw9SQDX3QhhakPvA=; b=Ww5w7O3d4ciLgdUvHp4rz5PbKiecQQ7HxnL0f9bs6tTb3xyDsdQZO+GfdvZRQNOOZw ETFm6Kh89IM446a4+8Fl2qRtcLMrh5pcfmyYmFaQOerIoWwmHhYQsn60WZ4UbKvAhez5 pYiahmR48ZgMfKw8T50VJSmKbqnk/xYsFdMxUpHv3BXnV2zmpVUN3DqMB9JVE70UTTRN YBnbg6QNANwBb410f3/yN6TvtFvNoDuHs2lFJH7YFLU9qTzgg4Xm8zaiH030b7cqDyqW tavMrIKGKrBvUcDoBq1Dik+dpF5EhEHdXrZRbXj+aAcUDngDLh0QoRKEtD+q0XwQdMHh dJBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fcvn+EBTPkyr1U40quS+QPEPDpsQw9SQDX3QhhakPvA=; b=BxLJ6RaUc5PapLlQxHIrg+i4rDbGqyX9rAEpR49KYS+cKxnKMVz4Trbrb/kWkeV8f+ HmWFJLGJEYsLOh8QbTYJVGQ5OlE6cM7ZdM7ov6DyiKaAnepv0ZY4cvzlKRMIK659Pa2M dIs15TTp9U4FzavO6fAb9LOq4B83G8J602m63ILYxWeJFQIqgP4eKNYudjyH2cIRv7Me xA72dtX4Ly2iwnD+JHu64tZABcy8ld7cNmvpxmflcbZ9607rzBy5oVukuaESTRi8v82f QSsbj2SV7WTyKE5MIGbBoZnwM79qRwqPVW7dDXm00hHS7tCpI+QIOkLz5r3S54s1GnLE ohzA== X-Gm-Message-State: AJaThX4LEli5uc17gtyP+gZKAsdFIo7s0YjSPMIBwIqZgKHusbGq2mO7 cxIjjj6QknRx5Cv/r8Bo8Qr+926E5ItTc8PymDU= X-Google-Smtp-Source: AGs4zMZwwUjXAPQJFjA1sim9gpc5Zqd4hRT+VUj1G2sfA53y/ImNdbpSYMcZXGYY8AC8e4agzTZddIgX68h7t4Fgno0= X-Received: by 10.55.245.22 with SMTP id l22mr1825544qkk.20.1510337520021; Fri, 10 Nov 2017 10:12:00 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::233 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:220033 Archived-At: --089e082db3585f36f3055da4db49 Content-Type: text/plain; charset="UTF-8" Stefan Monnier schrieb am Fr., 10. Nov. 2017 um 19:03 Uhr: > >>> 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? > > It's the other way round: alignas(8) is an error when the natural alignment of the object is *greater* than 8. --089e082db3585f36f3055da4db49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Stefan= Monnier <monnier@iro.umontr= eal.ca> schrieb am Fr., 10. Nov. 2017 um 19:03=C2=A0Uhr:
>>> union gcaligned_foo { struct foo = s; int64_t gcaligned; };
>> Are int64_t necessarily aligned on multiples of 8 on 32bit platfor= ms?
> 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 tha= n
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?


It's the other way round:=C2=A0alignas= (8) is an error when the natural alignment of the object is *greater* than = 8.
--089e082db3585f36f3055da4db49--