<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi <br>
<br>
I get a Parse error on variable declaration in the middle of a function.<br>
<br>
I started a question about this on this site:<br>
<a class="moz-txt-link-freetext"
href="http://stackoverflow.com/questions/669023/how-can-i-make-splint-ignore-where-i-declare-my-variables">http://stackoverflow.com/questions/669023/how-can-i-make-splint-ignore-where-i-declare-my-variables</a><br>
And somebody believed that this could be a error in splint, since this
was correct c99 code. <br>
(I hope it is correct c99, gcc approves anyway).<br>
<br>
A short version of the error:<br>
<br>
#include <stdio.h><br>
int main()<br>
{<br>
printf("Hello splint test\n");<br>
<br>
int i;<br>
for(i=5;i>0;i--)<br>
{<br>
printf("%2d...\n",i);<br>
}<br>
<br>
return 0;<br>
}<br>
<br>
And splint returns this:<br>
<br>
splint +gnuextensions main.c<br>
Splint 3.1.1 --- 03 Nov 2006<br>
<br>
Command Line: Setting +gnuextensions redundant with current value<br>
main.c:8:8: Parse Error. (For help on parse errors, see splint -help<br>
parseerrors.)<br>
<br>
<br>
Platform used is Ubuntu 8.04 with gvim as editor.<br>
<br>
Is this a splint bug or did I miss something?<br>
<br>
Thanks <br>
Johan<br>
<br>
Note: sorry if this mail comes twice, I accidentally sent it from the
wrong address the first time.<br>
But I think that that mail got trapped in a filter, but if it is not
and it hits the list I apologies in advance.<br>
<code><span class="pln"></span></code>
<br>
</body>
</html>