lclint-interest message 110

From Fri Sep 27 10:51:52 1996
Date: Fri, 27 Sep 96 10:40:50 -0400
From: (David Evans)
In-Reply-To: Matteo Vaccari's message of Thu, 26 Sep 1996 17:46:31 +0200 (MET DST) <>
Subject: Please subscribe

> My interest in lclint is simply for personal use in my programming
> work.  Speaking of which, since I do most of my programming on the
> Macintosh, I hope to be able to use lclint to check Mac C code.  There
> are a few C extensions that are commonplace on the Mac; for instance
> this is a common idiom in header files:
>	pascal void Debugger(void) = 0xA9FF;
> and also this:
>	short ApFontID:0x984;
> (the latter means that variable ApFontID should be found at the given
> address). 

There's no easy way to get lclint to handle non-standard syntax.  Other
than actually changing the parser to handle it, you could use macros to
make the non-standard syntax look standard when lclint is used.  For

# ifdef __LCLINT__
# define pascal
# define FUNC_ADDR(x)
# else
# define FUNC_ADDR(x) = x
# endif

pascal void Debugger(void) FUNC_ADDR(0xA9FF) ;

Of course, this can get a bit kludgey after a while.

--- Dave

Previous Message Next Message Archive Summary LCLint Home Page David Evans
University of Virginia, Computer Science