Mail Archives: djgpp/2008/01/20/09:13:13
Am Samstag, 19. Januar 2008 18:19 schrieb Joan Salvat:
>
> Juan Manuel,
>
> I've been testing that partiular version you released, and found the following behaviour when trying to use it to check MS-DOS programs built using Borland C++ version 3.1
>
> Splint 3.1.2 --- 16 Jan 2008
> c:\borlandc\include\dos.h:310:46: Parse Error. (For help on parse errors, see splint -help parseerrors.)*** Cannot continue.
> Line 310 in dos.h file is
>
> unsigned _Cdecl _dos_read( int __fd, void far *__buf, unsigned __len, unsigned _FAR *__nread );
> I think Splint cannot parse 'far' type modifier.
Yes, you are right and there is no solution for this issue.
It should be noticed that Splint is a tool that is a little bit unix and gcc
centric. The preprocessor Splint uses to process the headers and files is
taken from gcc. Splint is able to handle ANSI C but does not know anything
about some particular OS or CPU architecure dependent C language extension.
Splint does not know anything about WIN32 pecularities nor DOS peculiarities.
It is simply ANSI C and nothing else.
My port is neither a port to MSDOS nor to WinXP or what ever else. It is a port
intended to be used with DJGPP because it uses gcc and produces ANSI C code.
With other words: if you want to be sure that it is possible to use Splint,
send your code through gcc. If the passes through gcc you will able to
analyse it with Splint.
> Any suggestion to work around this problem? The tips shown in '--help parseerrors' don't seem to work.
Sorry but you are alone. Probably you will have to modify src/cgrammar.y and
src/cscanner.l and implememt code capable to deal with the 'far' type modifier.
Regards,
Juan M. Guerrero
- Raw text -