I run debian linux actual stable with splint and mingw installed. I want to check my c code (which I need to compile with mingw, sorry) by splint. Simply adding the mingw-includes is not enough to run. I tried with defining GNU and i686 - but I'm sure more is needed. What further do I have to define or include?
I tried the idea from loan resulting in a problem with __builtin_va_list
.
Splint 3.1.2 --- 20 Feb 2009
/usr/i686-w64-mingw32/include/vadefs.h:24:43: Parse Error:
Suspect missing struct or union keyword: __builtin_va_list :
int. (For help on parse errors, see splint -help parseerrors.)
*** Cannot continue.
The funny thing is, that I can not find any definition for not - even with a recursive grep on the include folders. Am I searching wrong?
By defining it the way -D__builtin_va_list=va_list
(from benjarobin) I ran into the error
Splint 3.1.2 --- 20 Feb 2009
/home/ebelingb/.splintrc:229:1: Setting -stats redundant with current value
/home/ebelingb/.splintrc:229:1: Setting -showsummary redundant with current
value
/usr/i686-w64-mingw32/include/winnt.h:2390:15:
Parse Error. (For help on parse errors, see splint -help parseerrors.)
*** Cannot continue.
which could not be recovered even by +trytorecover.
The lines from winnt.h (and neighbouring) reads
2388 typedef struct _EXCEPTION_POINTERS {
2389 PEXCEPTION_RECORD ExceptionRecord;
2390 PCONTEXT ContextRecord;
2391 } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS;
Strange, isn't it?
Okay as this thread gets no further answers, I'll give some motivation by this minimal not working example:
Given a file test.c
#include <windows.h>
#include <stdio.h>
#include <time.h>
#define LOGFILEFORMAT "C:\\CBM\\log\\%Y%m%d.log"
#define LOGTIMESTAMPFORMAT "%Y-%m-%d %H:%M:%S"
int main() /*int argc,char **argv*/{
Sleep(1234);
return (0);
}
and my .splintrc
-I/usr/lib/gcc/i686-w64-mingw32/4.6/include
-I/usr/lib/gcc/i686-w64-mingw32/4.6/include-fixed
-I/usr/i686-w64-mingw32/include
the easy command splint test.c
fails:
Splint 3.1.2 --- 20 Feb 2009
/usr/i686-w64-mingw32/include/_mingw.h:480:29: Parse Error:
Suspect missing struct or union keyword: __int64 :
long int. (For help on parse errors, see splint -help parseerrors.)
*** Cannot continue.
Again I do not know, how to setup. The includes above result from a preprocesing call of the compiler i686-w64-mingw32-gcc
, which runs fine on test.c
.