RE: "@tiny" statement

2002-10-01 Thread Simon Hosie

Filippo Ferrara:
> I have some problem with the "Cosmic" compiler statement @tiny which
> is not recognised by Splint.
> What can I do to make Splint ignore "@tiny" (without commenting it)?
> or what ca I do to Splint to recognise such statement?

I'm inclined to infer that if you don't want to comment it then it's not actually 
conflicting with Splint annotations, and the statement appears naked in the code.  In 
that case:

Firstly, see if you can acheive the same result with #pragma.  That's the normal way 
of doing things that aren't portable (if you can't, you may want to coax the author 
into adding something like that).

Otherwise, if the compiler provides some pre-defined macro to identify itself to the 
source code (assume it's __COSMIC__) add something like this in a header file common 
to all the source files:

#ifdef __COSMIC__
#define AT_TINY @tiny
#else
#define AT_TINY
#endif

or if they don't provide a macro:

#ifndef S_SPLINT_S
#define AT_TINY
#else
#define AT_TINY @tiny
#endif

Then replace all your '@tiny's with 'AT_TINY'.


Doing a search I see that Cosmic's an embedded compiler.  Are there a lot of embedded 
programmers using splint?




Re: "@tiny" statement

2002-10-01 Thread David Evans


You can use the commentchar flag to set splint's command character to
something other than @.  For example, -commentchar # (and then the splint
annotations would be marked as /*#only#*/.

--- Dave

On Tue, 1 Oct 2002, Filippo Ferrara wrote:

> Hi to everybody
> I have some problem with the "Cosmic" compiler statement @tiny which is not
> recognised by Splint.
> What can I do to make Splint ignore "@tiny" (without commenting it)?
> or what ca I do to Splint to recognise such statement?
> Filippo Ferrara
>