[OPEN-ILS-DEV] Testing Evergreen

Scott McKellar mck9 at swbell.net
Thu Oct 22 15:20:50 EDT 2009


I haven't tried Clang, but I tried splint a month or two ago.  I found it unusable for our C code because it expects local variables always to be declared before any executable statements in the 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 hope Clang isn't so finicky.

Scott McKellar


--- On Thu, 10/22/09, Shawn Boyette <sboyette at esilibrary.com> wrote:

> From: Shawn Boyette <sboyette at esilibrary.com>
> Subject: Re: [OPEN-ILS-DEV] Testing Evergreen
> To: open-ils-dev at list.georgialibraries.org
> Date: Thursday, October 22, 2009, 12:48 PM
> Should have linked to the clang
> static analyzer page also, for more awesome:
> 
> http://clang-analyzer.llvm.org/
> 
> -- Shawn Boyette
> <sboyette at esilibrary.com>
> Testing and Reliability
> Equinox Software, Inc.
> 


More information about the Open-ils-dev mailing list