Le 30 oct. 07 à 01:25, David Chisnall a écrit : > On 29 Oct 2007, at 23:12, Quentin Mathé wrote: > >> Le 28 oct. 07 à 11:20, Mildred a écrit : >> >>> In all GCC versions (except Apple one) that I have used until now, >> C99 wasn't enabled by default. > > The Apple one doesn't default to C99 either; you have to set it in > XCode for each project.
Right. >>> I tried the command line: >>> make CFLAGS="$CFLAGS -std=c99" >>> but it doesn't work at all. > > The correct syntax for that would be: > > CFLAGS="$CFLAGS -std=c99" make This doesn't work for me. >> I had the same issue the first time I tried to enable C99, it's a bit >> weird that doesn't work. >> make CPPFLAGS="$CPPFLAGS -std=c99" should work well. > > CPPFLAGS sets the flags for the preprocessor. It works reliably that's why I use it :-) >> For GNUmakefile like etoile.make, what you have to use is: >> ADDITIONAL_CPPFLAGS += -std=c99 >> or >> ADDITIONAL_OBJCFLAGS += -std=c99 > > The problem here is that it's a C file. I remembered to set -std=c99 > for Objective-C, but not for C. Somehow I think the Objective-C flags > got picked up for C the first few times I compiled it (GNUstep make is > just plain weird; it seems to cache things very aggressively and > ignore changes in the makefile half the time). Interesting bug. In my opinion, ADDITIONAL_OBJCFLAGS += "-std=c99" seems wrong because C dialect preferences has nothing to do with ObjC only features/flags. ADDITIONAL_CPPFLAGS is a little less wrong may be, not really sure though ;-) >>> Have you any suggestions how to solve that ? Maybe modify a >>> GNUmakefile >>> somewhere (I don't want to modify the system makefiles, that is >>> outside >>> of the Étoilé tree. But there may be a way to add CFLAGS >>> somewhere in >>> the Makefiles of the Étoilé tree ...) > > I've fixed it in svn now. Thanks for taking care of that. Cheers, Quentin. _______________________________________________ Etoile-discuss mailing list [email protected] https://mail.gna.org/listinfo/etoile-discuss
