<html>
<body>
Thanks Brain and all,<br><br>
I have defined :<br><br>
<font face="Courier New, Courier">-D__PTRDIFF_T_TYPE__="unsigned
int" <br><br>
-D__SIZE_T_TYPE__="unsigned int"<br><br>
</font>The problem was in sysmac.h at 2 places which have:<br><br>
#if sizeof((char*)0 - (char*)0) <=
sizeof(int)<br><br>
It said:<br><br>
<font face="Courier New, Courier"> In file included from
C:\Asim\work\IAR_inc\string.h(13),<br>
from ./c/magtampermgr.c(26)<br>
C:\Asim\work\IAR_inc\sysmac.h(60,23): syntax error - missing right
operand<br>
Preprocessing error for file: ./c/magtampermgr.c<br>
*** Cannot continue.<br>
*** Error code 1 (ignored)<br><br>
</font>Maybe you would like to add support in lint for IAR compiler for
code which uses string.h.<br><br>
Regards,<br>
Asim.<br><br>
<br>
At 20:46 16/07/2007, Brian Quinlan wrote:<br>
<blockquote type=cite class=cite cite="">On Mon, 2007-07-16 at 19:34
+0200, Ludolf Holzheid wrote: <br>
> On Mon, 2007-07-16 16:32:59 +0100, Asim Zaka wrote:<br>
> > <html><br>
> > <body><br>
> > Hi All,<br><br><br>
> > I am putting my C code through SPlint for refining it using IAR
C<br>
> > compiler for H8 microprocessors. I get the following
errors:<br><br><br>
> > <font face="Courier New, Courier">splint.exe
-preproc -linelen 600<br>
> > -DH8_38327 -DCLOCK_16MHZ -D_ISSUE -I./h/ -I\inc&nbsp;<br>
> > [..]<br>
> > Splint 3.0.1.6 --- 11 Feb 2002<br><br><br>
> > &nbsp;&nbsp; In file included from<br>
> >
\\fx1112\compilers\h8300\v4_20c\inc\string.h(13),<br><br>
> >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
> > from ./c/magtampermgr.c(26)<br><br>
> > \\fx1112\compilers\h8300\v4_20c\inc\sysmac.h(52,23): syntax
error -<br>
> > missing right operand<br><br>
> <br>
> Hi Asim,<br>
> <br>
> you'll never get the IAR headers parsed by an ISO/ANSI-C parser.
It<br>
> will choke at least at the sfrb and sfrw statements.<br>
> <br>
> For an H8 project I used splint with, I wrote my own versions of
the<br>
> offending headers and put them in a separate directory. I've put
this<br>
> directory on the top of the list of include directories for
splint<br>
> (i.e. first -I flag) in order to have them parsed instead of the
IAR<br>
> ones.<br>
> <br>
> Of course, the compiler still used the original headers.<br>
> <br>
> HTH,<br>
> <br>
> Ludolf<br>
> <br>
Hi Asim & Ludolf,<br>
If sfrb, sfrw or indeed anything else non-standard is causing parse<br>
problems for splint, you may find that you can usefully redefine
them<br>
via the splint -D command-line option. A few examples:<br><br>
-Dsfrb="" will tell splint's preprocessor to define sfrb
to be the<br>
empty string.<br><br>
-Dsfrb="unsigned char" will tell splint to treat sfrb as an
unsigned<br>
character.<br><br>
-Dsfrb'('w,x,y,z')'="" might be more appropriate if sfrb takes
arguments<br><br>
I'm not familiar with the IAR compiler, so I don't know if sfrb &
sfrw<br>
can safely be ignored by splint, or whether redefining them will
"fool"<br>
splint appropriately.<br><br>
Bye,<br>
Brian<br><br>
<br>
_______________________________________________<br>
splint-discuss mailing list<br>
splint-discuss@ares.cs.Virginia.EDU<br>
<a href="http://www.cs.virginia.edu/mailman-2.1.5/listinfo/splint-discuss" eudora="autourl">
http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/splint-discuss</a>
</blockquote>
<x-sigsep><p></x-sigsep>
Asim Pervez Zaka<br>
Firmware Engineer<br><br>
<b>Actaris,<br>
</b>Langer Road,<br>
Felixstowe, Suffolk,<br>
England<br>
IP11 2ER<br><br>
</body>
</html>