[splint-discuss] Parse Error on variable declaration in the middle of a function.
Jeff Johnson
n3npq at mac.com
Sat Mar 21 05:42:52 PST 2009
Random variable declarations within code is C99, not C.
splint is a C, not a C99, parser.
73 de Jeff
On Mar 21, 2009, at 7:38 AM, Johan wrote:
> Hi
>
> I get a Parse error on variable declaration in the middle of a
> function.
>
> I started a question about this on this site:
> http://stackoverflow.com/questions/669023/how-can-i-make-splint-ignore-where-i-declare-my-variables
> And somebody believed that this could be a error in splint, since
> this was correct c99 code.
> (I hope it is correct c99, gcc approves anyway).
>
> A short version of the error:
>
> #include <stdio.h>
> int main()
> {
> printf("Hello splint test\n");
>
> int i;
> for(i=5;i>0;i--)
> {
> printf("%2d...\n",i);
> }
>
> return 0;
> }
>
> And splint returns this:
>
> splint +gnuextensions main.c
> Splint 3.1.1 --- 03 Nov 2006
>
> Command Line: Setting +gnuextensions redundant with current value
> main.c:8:8: Parse Error. (For help on parse errors, see splint -help
> parseerrors.)
>
>
> Platform used is Ubuntu 8.04 with gvim as editor.
>
> Is this a splint bug or did I miss something?
>
> Thanks
> Johan
>
> Note: sorry if this mail comes twice, I accidentally sent it from
> the wrong address the first time.
> 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.
>
> _______________________________________________
> splint-discuss mailing list
> splint-discuss at mail.cs.virginia.edu
> http://www.cs.virginia.edu/mailman/listinfo/splint-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090321/5108a1af/attachment-0001.html
More information about the splint-discuss
mailing list