From: Alan Third <alan@idiocy.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: GCC, Objective-C and C99
Date: Fri, 28 Aug 2020 01:28:16 +0200 (CEST) [thread overview]
Message-ID: <20200827232813.GA57681@breton.holly.idiocy.org> (raw)
In-Reply-To: <1a326daf-ffaa-ff62-6fcc-295e3854e2d8@cs.ucla.edu>
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
prev parent reply other threads:[~2020-08-27 23:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 21:24 GCC, Objective-C and C99 Alan Third
2020-08-27 22:07 ` Paul Eggert
2020-08-27 23:28 ` Alan Third [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200827232813.GA57681@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.