X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Authenticated: #27081556 X-Provags-ID: V01U2FsdGVkX1/U2fcvPhvUId6hct4vuAgkp7PASe+1ny0wwxRXrF GCzFATmKIqn1GD From: Juan Manuel Guerrero To: Joan Salvat Subject: Re: Splint 3.1.2 release 16 Jan 2008 (MS-DOS) Date: Sun, 20 Jan 2008 14:47:03 +0100 User-Agent: KMail/1.9.5 Cc: djgpp AT delorie DOT com References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801201447.03906.juan.guerrero@gmx.de> X-Y-GMX-Trusted: 0 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