[splint-discuss] New user and simple program
Ned Konz
ned at bike-nomad.com
Mon Aug 31 06:51:34 PDT 2009
On Aug 31, 2009, at 6:39 AM, Fred J. Tydeman wrote:
> I am trying to use splint for the first time.
> I cannot get it to work on this simple program (test99.c).
> splint complains about both #error lines.
> This is on an Intel Pentium 4 running Fedora Core
> 9 and 10 Linux. The command line is: splint test99.c
> The program compiles and runs fine with gcc 4.3.2
>
> #include <stdio.h>
> #include <limits.h>
> #ifndef CHAR_BIT
> #error ... 1
> #endif
> #if 8 != CHAR_BIT
> #error ... 2
> #endif
> int main(void){
> (void)printf("CHAR_BIT=%i\n", CHAR_BIT);
> return 0;
> }
Well, is CHAR_BIT defined?
If I add a line
#define CHAR_BIT 8
at the top, then no errors occur.
More information about the splint-discuss
mailing list