On 10 May 2007, at 13:44, Nicola Pero wrote:
Sorry, forgot to put the mailing list in Cc:
Thanks
Is there a flag we can pass to ask GCC to refuse c99-isms ?
There must be one.
-std=c89 or -std=gnu89 depending on whether we want to permit
GNU C extensions.
Nicola answered:
Actually, they seem to work -- the problem is that -std=gnu89 is
already the standard, but was changed in GCC 3.0
to allow declarations of variables in the middle of code (which
are, in this context, a 'GNU extension' borrowed
from c99).
I think what we want is
-Wdeclaration-after-statement
The problems are:
* not sure if that flag is available with GCC 2.95 -- need to
check what happens if you use it with GCC 2.95
* it generates a warning, not an error
Anyway, I'll add that flag to the core libs.
Thanks
How about -Werror? That might encourage people to clean up any
existing mess too ;-). OTOH it might be a scary amount of mess...
Cheers,
Graham.
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev