From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: GCC, Objective-C and C99 Date: Fri, 28 Aug 2020 01:28:16 +0200 (CEST) Message-ID: <20200827232813.GA57681@breton.holly.idiocy.org> References: <20200827212359.GE53184@breton.holly.idiocy.org> <1a326daf-ffaa-ff62-6fcc-295e3854e2d8@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29183"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs-Devel devel To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 28 01:29:01 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBRKG-0007Pf-3m for ged-emacs-devel@m.gmane-mx.org; Fri, 28 Aug 2020 01:29:00 +0200 Original-Received: from localhost ([::1]:43298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBRKF-0004fZ-5a for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Aug 2020 19:28:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBRJj-0004Cx-Pa for emacs-devel@gnu.org; Thu, 27 Aug 2020 19:28:28 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:43706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBRJf-0004Ya-7E for emacs-devel@gnu.org; Thu, 27 Aug 2020 19:28:27 -0400 Original-Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 6650D14CD; Fri, 28 Aug 2020 01:28:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1598570897; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; l=1361; bh=L5/4N3t9RpHjFoOyLjwqKL4MXj4130vg0jv/Dapik9Q=; b=V132H5muPoTP6em78Ze/ha+okcCyxRf57Hjo93Ck9AXpRZa6mTm6ZM57ox1mhrL+ KUQt5bKWHRUqAA9Iav8HrgS2A+mLjGR7Ab4/SeLjjZb65Ab84QVHkUxTRnddVeNpfhQ Pbusvr0NphYOPFutJnfp0uRMlQfimZrZilCA37Hr/6p9ctjDjwth++zhf324TOayVgg yWNhIIL9vl62TjKKiEBCS//HvBdlOSY01RO5TqKPLMNCt0twRYbS9mZzD3ZQohy8DX9 ovt1QZo81/QKce06VJiLzMcilfPK86Nc83En4UiqG2x4XvHsA2eMPxh285aEuwHPUoA BpiiOjn6/Q== Original-Received: by smtp.mailfence.com with ESMTPA ; Fri, 28 Aug 2020 01:28:15 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id E2C3B2024E52FA; Fri, 28 Aug 2020 00:28:13 +0100 (BST) Mail-Followup-To: Alan Third , Paul Eggert , Emacs-Devel devel Content-Disposition: inline In-Reply-To: <1a326daf-ffaa-ff62-6fcc-295e3854e2d8@cs.ucla.edu> X-ContactOffice-Account: com:241649512 Received-SPF: pass client-ip=212.3.242.97; envelope-from=alan@idiocy.org; helo=mailout-l3b-97.contactoffice.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 19:28:18 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254340 Archived-At: On Thu, Aug 27, 2020 at 03:07:25PM -0700, Paul Eggert wrote: > On 8/27/20 2:24 PM, Alan Third wrote: > > What's really odd is that I never had this problem when I built on a > > VM based off Debian Jessie, but I now do with the Debian Stretch > > Docker image. I guess something's changed with GCC. > > Perhaps the newer GCC no longer needs -std=c99 when compiling C files (so > 'configure' doesn't add the option automatically), but for some reason GCC > still rejects declarations in for loops when compiling Objective C files > unless you also specify -std=c99. > > If this guess is correct, perhaps simply putting -std=c99 into the following > line in configure.ac would work around this GCC glitch. > > ## Extra CFLAGS applied to src/*.m files. > GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import > -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 > -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" I tried that (and I tried gnu99 too) but it made no difference: https://emba.gnu.org/emacs/emacs/-/commit/445d18f97350d502067972d4291b9224b2f9d3c1 Oh wait, I think I see where that went wrong. That is only executed if NS_GNUSTEP_CONFIG isn't set, which it probably will be. That part must be a backup for if gnustep-config isn't usable. I think I know what to do. Thanks! -- Alan Third