Beg to differ.  Straight from the splint FAQ item 6:

Which compilers does Splint support?

Splint is independent from your compiler. It checks standard C code, according 
to the ISO C99 specification. Splint supports most, but not all, of the C99 
extensions to the ANSI C. Splint supports some of the gcc compiler extensions 
(if +gnuextensions is used).

Bye for now,

Chris

-----Original Message-----
From: splint-discuss-boun...@cs.virginia.edu 
[mailto:splint-discuss-boun...@cs.virginia.edu] On Behalf Of Richard O'Keefe
Sent: Wednesday, August 24, 2011 9:29 PM
To: Discussions about the Splint annotation-assisted static analysis project
Cc: splint-discuss@mail.cs.virginia.edu
Subject: Re: [splint-discuss] split: parse error on subsequent same scope 
variable declaration


On 25/08/2011, at 2:06 AM, Chris Welch wrote:

> I'm trying to deploy splint to clean up a project but keep hitting parsing 
> errors due to subsequent declarations of variables in the same scope.

That's because splint is a checker for (ANSI C89) = (ISO C90).
Mixing declarations and statements is flat-out unambiguously
quite illegal in that language.

Mixing declarations and statements came from Algol 68 via C++
and entered C officially in C99.

There _isn't_ any problem with splint in that it is doing
exactly what it was designed and documented to do.
There _is_ a problem with splint in that C1x isn't _that_
far away and we still don't have a version of splint for C99.

However, of all the C99 features, this is one of the easiest
to do without.  Instead of
        {
          d1;
          s1;
          d2;
          s2;
          d3;
          s3;
        }
write
        {
          d1;
          s1;
          {
            d2;
            s2;
            {
              d3;
              s3;
            }
          }
        }



_______________________________________________
splint-discuss mailing list
splint-discuss@mail.cs.virginia.edu
http://www.cs.virginia.edu/mailman/listinfo/splint-discuss

_______________________________________________
splint-discuss mailing list
splint-discuss@mail.cs.virginia.edu
http://www.cs.virginia.edu/mailman/listinfo/splint-discuss

Reply via email to