[OPEN-ILS-DEV] Testing Evergreen

Jason Stephenson jstephenson at mvlc.org
Thu Oct 22 15:49:40 EDT 2009


Quoting David Fiander <david at fiander.info>:

> same block.  E.g. it chokes on something like this:
>>
>> int main( void )
>> {
>>    printf( "Hello, World!\n" );
>>
>>    int rc = 0;
>>    return rc;
>> }
>>
>> Our C code does this sort of thing a lot.  It's not kosher  
>> according to C89, but GCC accepts it without complaint.  I'm not  
>> sure what the C99 standard has to say on the subject.  In any case  
>> it's a useful language feature because it allows you to further  
>> limit the scope of your local variables.  It saddens me that splint  
>> doesn't like it.
>
> I choke on that. I suspect that gcc accepts it because it is
> acceptable for C++, and GCC does both languages. But then, I'm old
> school.
>

It is also acceptable in C99. If you set -std=c89 on the command line,  
I do believe that gcc will choke on the above code. With -std=c99 or  
-std=gnu89 (the default), gcc accepts the above code.

However, we're getting off-topic.

Jason


More information about the Open-ils-dev mailing list