Stephen Warren wrote: > Phil Dibowitz wrote: >> Stephen Warren wrote: >>> Stephen Warren wrote: >>>> I propose we replace "-ansi -pedantic-errors" with "-std=c99". >>> Sorry, just remove "-ansi -pedantic-errors" and don't add "-std=c99"; >>> the variadic macro works with -std=c99, but the strdup prototype still >>> isn't present unless we just remove all the standard-selection options. >> Nope, -ansi is an alias for -std=c99 which DOES NOT error on stuff like >> variables not at the top. -pedantic-errors is required. > > -ansi is NOT -std=c99. ANSI C (1989) was standardized way before C99 > (1999). See the build logs below. See > http://en.wikipedia.org/wiki/C_%28programming_language%29
Sorry, I meant -ansi is the same as -std=c89:
From gcc(1):
c89
iso9899:1990
ISO C90 (same as -ansi).
And again, you missed what I said about declarations not at the top. This is
why we use -ansi -pedantic-errors:
[EMAIL PROTECTED] tmp]$ gcc -std=c99 foo.c
[EMAIL PROTECTED] tmp]$ gcc -std=c99 -pedantic-errors foo.c
[EMAIL PROTECTED] tmp]$ gcc -ansi -pedantic-errors foo.c
foo.c: In function 'main':
foo.c:9: error: ISO C90 forbids mixed declarations and code
[EMAIL PROTECTED] tmp]$
It's the ONLY combination that seems to catch that error.
--
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Never write it in C if you can do it in 'awk';
Never do it in 'awk' if 'sed' can handle it;
Never use 'sed' when 'tr' can do the job;
Never invoke 'tr' when 'cat' is sufficient;
Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ concordance-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/concordance-devel
