<html>
<body>
Thanks Brain and all,<br><br>
I have defined :<br><br>
<font face="Courier New, Courier">-D__PTRDIFF_T_TYPE__=&quot;unsigned
int&quot; <br><br>
-D__SIZE_T_TYPE__=&quot;unsigned int&quot;<br><br>
</font>The problem was in sysmac.h at 2 places which have:<br><br>
#if&nbsp;&nbsp;&nbsp;&nbsp; sizeof((char*)0 - (char*)0) &lt;=
sizeof(int)<br><br>
It said:<br><br>
<font face="Courier New, Courier">&nbsp;&nbsp; In file included from
C:\Asim\work\IAR_inc\string.h(13),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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>
&gt; On Mon, 2007-07-16 16:32:59 +0100, Asim Zaka wrote:<br>
&gt; &gt; &lt;html&gt;<br>
&gt; &gt; &lt;body&gt;<br>
&gt; &gt; Hi All,&lt;br&gt;&lt;br&gt;<br>
&gt; &gt; I am putting my C code through SPlint for refining it using IAR
C<br>
&gt; &gt; compiler for H8 microprocessors. I get the following
errors:&lt;br&gt;&lt;br&gt;<br>
&gt; &gt; &lt;font face=&quot;Courier New, Courier&quot;&gt;splint.exe
-preproc -linelen 600<br>
&gt; &gt; -DH8_38327 -DCLOCK_16MHZ -D_ISSUE -I./h/ -I\inc&amp;nbsp;<br>
&gt; &gt; [..]<br>
&gt; &gt; Splint 3.0.1.6 --- 11 Feb 2002&lt;br&gt;&lt;br&gt;<br>
&gt; &gt; &amp;nbsp;&amp;nbsp; In file included from<br>
&gt; &gt;
\\fx1112\compilers\h8300\v4_20c\inc\string.h(13),&lt;br&gt;<br>
&gt; &gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;<br>
&gt; &gt; from ./c/magtampermgr.c(26)&lt;br&gt;<br>
&gt; &gt; \\fx1112\compilers\h8300\v4_20c\inc\sysmac.h(52,23): syntax
error -<br>
&gt; &gt; missing right operand&lt;br&gt;<br>
&gt; <br>
&gt; Hi Asim,<br>
&gt; <br>
&gt; you'll never get the IAR headers parsed by an ISO/ANSI-C parser.
It<br>
&gt; will choke at least at the sfrb and sfrw statements.<br>
&gt; <br>
&gt; For an H8 project I used splint with, I wrote my own versions of
the<br>
&gt; offending headers and put them in a separate directory. I've put
this<br>
&gt; directory on the top of the list of include directories for
splint<br>
&gt; (i.e. first -I flag) in order to have them parsed instead of the
IAR<br>
&gt; ones.<br>
&gt; <br>
&gt; Of course, the compiler still used the original headers.<br>
&gt; <br>
&gt; HTH,<br>
&gt; <br>
&gt; Ludolf<br>
&gt; <br>
Hi Asim &amp; 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>
&nbsp;-Dsfrb=&quot;&quot; will tell splint's preprocessor to define sfrb
to be the<br>
empty string.<br><br>
-Dsfrb=&quot;unsigned char&quot; will tell splint to treat sfrb as an
unsigned<br>
character.<br><br>
-Dsfrb'('w,x,y,z')'=&quot;&quot; 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 &amp;
sfrw<br>
can safely be ignored by splint, or whether redefining them will
&quot;fool&quot;<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>