From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Strange test in stdalign.m4 Date: Fri, 29 Mar 2013 20:25:59 +0300 Message-ID: <83txnu3yoo.fsf@gnu.org> References: <8338ve5k4u.fsf@gnu.org> <5155C712.2090409@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1364577949 18273 80.91.229.3 (29 Mar 2013 17:25:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Mar 2013 17:25:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 29 18:26:16 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ULd4A-0003DM-Bd for ged-emacs-devel@m.gmane.org; Fri, 29 Mar 2013 18:26:14 +0100 Original-Received: from localhost ([::1]:39837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULd3l-0000Ap-SQ for ged-emacs-devel@m.gmane.org; Fri, 29 Mar 2013 13:25:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULd3e-000098-8Y for emacs-devel@gnu.org; Fri, 29 Mar 2013 13:25:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULd3b-0000c9-SP for emacs-devel@gnu.org; Fri, 29 Mar 2013 13:25:42 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:40884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULd3b-0000bd-JN for emacs-devel@gnu.org; Fri, 29 Mar 2013 13:25:39 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MKF00B00N2I0S00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Fri, 29 Mar 2013 20:25:37 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MKF00AF6N2PSNC0@a-mtaout23.012.net.il>; Fri, 29 Mar 2013 20:25:37 +0300 (IDT) In-reply-to: <5155C712.2090409@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158435 Archived-At: > Date: Fri, 29 Mar 2013 09:53:38 -0700 > From: Paul Eggert > CC: emacs-devel@gnu.org > > On 03/29/2013 07:57 AM, Eli Zaretskii wrote: > > I tried this with 2 different versions of GCC on 2 different systems, > > with the same results. > The test works for me, with GCC 4.7.2 and 4.8.0. But you're right, it > does rely on an extension to ISO C11. Which GCC versions > were you using? The newest one was 4.4.3 (on fencepost). This is the best I can do this weekend ;-) > The test should be ported to them. Does it fix things for you if we > replace the last four lines of the test with this? > > #if (__GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C || > 1300 <= _MSC_VER) > struct alignas_test { char c; int alignas (8) alignas_int; } > alignas_test = { 1, 1 }; > char test_alignas[offsetof (struct alignas_test, alignas_int) == 8 ? > 1 : -1]; > #endif Yes, this works. Thanks.