[splint-discuss] Parsing error
Ludolf Holzheid
lholzheid at bihl-wiedemann.de
Tue Apr 8 06:31:09 PDT 2008
On Tue, 2008-04-08 14:46:07 +0200, Putten Bob van der wrote:
> Ludolf,
> It is a special function register.
> In the header file it is declared as:
> sfr U0BRG = 0x3A1; /* UART 0 baud rate generator */
>
> But Splint does not 'like' sfr.
>
> So I wrote:
>
> #ifdef S_SPLINT_S
> #define sfr unsigned int
> #endif
So, the "unsigned int U0BRG = 0x3A1;" appears in a header, not in the
body of a function (i.e. at 'file scope'). This is no valid C syntax.
You'll have to write a version of the header that conforms to the C
standard. Let the compiler use the original header and splint the new
one by e.g. different '-I' command line flags for splint and compiler.
HTH,
Ludolf
--
---------------------------------------------------------------
Ludolf Holzheid Tel: +49 621 339960
Bihl+Wiedemann GmbH Fax: +49 621 3392239
Floßwörthstraße 41 e-mail: lholzheid at bihl-wiedemann.de
D-68199 Mannheim, Germany
---------------------------------------------------------------
More information about the splint-discuss
mailing list