emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC, Objective-C and C99


From: Paul Eggert
Subject: Re: GCC, Objective-C and C99
Date: Thu, 27 Aug 2020 15:07:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]