From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Strange test in stdalign.m4 Date: Fri, 29 Mar 2013 09:53:38 -0700 Message-ID: <5155C712.2090409@cs.ucla.edu> References: <8338ve5k4u.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364576033 31136 80.91.229.3 (29 Mar 2013 16:53:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Mar 2013 16:53:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 29 17:54:20 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 1ULcZB-0000dh-9l for ged-emacs-devel@m.gmane.org; Fri, 29 Mar 2013 17:54:13 +0100 Original-Received: from localhost ([::1]:51606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULcYm-0005Lo-V6 for ged-emacs-devel@m.gmane.org; Fri, 29 Mar 2013 12:53:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULcYj-0005LY-5X for emacs-devel@gnu.org; Fri, 29 Mar 2013 12:53:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULcYh-0006Hg-Nk for emacs-devel@gnu.org; Fri, 29 Mar 2013 12:53:44 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:38182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULcYf-0006GS-AF; Fri, 29 Mar 2013 12:53:41 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 2D9C939E810A; Fri, 29 Mar 2013 09:53:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Pzzy6l3jJ5G; Fri, 29 Mar 2013 09:53:39 -0700 (PDT) Original-Received: from [10.10.0.115] (rrcs-74-62-23-134.west.biz.rr.com [74.62.23.134]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id BFA2639E8100; Fri, 29 Mar 2013 09:53:39 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 In-Reply-To: <8338ve5k4u.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 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:158433 Archived-At: 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 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