[Top][All Lists]

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

Re: sync.m

From: Richard Frith-Macdonald
Subject: Re: sync.m
Date: Wed, 3 Mar 2010 09:48:44 +0000

On 1 Mar 2010, at 20:16, Nicola Pero wrote:

>> We should not sacrifice new features or readability for the sake of
>> holding on to older architectures and compilers.
>> Also, the use of non-c99 standards does hinder contributions since we
>> constantly expect people who don't have access to c99 based compilers
>> to change their code to conform to c89.
> I  think we should have a clear, explicit and unemotional 
> support/compatibility strategy.  :-)
> As GCC 2.95.3 was released in March 16, 2001, it may make sense to no longer 
> support it.
> Or maybe it does.  I vote for supporting it.
> Anyway the question really is - what is the oldest GCC that we support if 
> it's not 2.95.3 ?
> 3.0.4 (released February 20, 2002) ?
> Just mentioning c99 doesn't seem to help that much since IIRC no version of 
> actually implements all of c99 anyway.  I actually am not really sure what 
> C99 features,
> added after 2.95, we really need.
>>>> Nobody is breaking things gratuitously.  The c99isms slip in to code 
>>>> simply because all modern compilers support them, and don't warn you that 
>>>> older compilers won't.  Most people use them habitually (locality of 
>>>> declaration of variables is particularly good for code readability for 
>>>> instance) and simply won't notice that they have used them.
> We can use -Wdeclaration-after-statement to get a post-2.95 GCC warn you when 
> you locally declare variables without starting a { } block.
> Really not a problem - it's easy enough to add it to gnustep-base and 
> gnustep-gui.

I didn't know about -Wdeclaration-after-statement

I guess it's true that the issue is not c99 as such ... I think the problem is 
almost entirely down to declarations after statements and the warning flag 
could catch that.

If so, adding  -Wdeclaration-after-statement would remove most of the 
maintenance issue (though of course it means you can't have locality of 
variable declaration without an ugly excess of curly braces to wrap them).

David's libobjc2 code won't even build using the compiler on CentOS/Redhant 4.5 
(gcc-4.1.2)  and we almost certainly can't insist on people using compilers 
younger than that... it's only three years old!

For now, I'll add -Wdeclaration-after-statement to gnustep base.

Still, I think we need to keep an eye on this issue.

reply via email to

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