Hi,
Splint cannot check GNU C codes (see bellow), the code can be compiled and run well (I'm on Debian/testing Linux).
$ gcc -Wall hello.c
$ ./a.out
Everything goes well, no warnings or errors.
But splint cannot parse this code:
$ splint hello.c
Splint 3.1.2 --- 20 Feb 2009
hello.c:7:31: Parse Error. (For help on parse errors, see splint -help
parseerrors.)
*** Cannot continue.
What about giving users an option that using a different C standard (C90/C99, GNU C, and so on).
// File: hello.c
#include <stdio.h>
double foo (double a, double b)
{
double square (double z) { return z * z; }
return square (a) + square (b);
}
int main (void)
{
printf("%f\n", foo(3, 4));
return 0;
}
test case