[splint-discuss] splint and c99
Michael Wojcik
Michael.Wojcik at microfocus.com
Fri Jul 18 15:01:19 PDT 2008
> From: splint-discuss-bounces at cs.virginia.edu
[mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Jake
Holland
> Sent: Friday, 18 July, 2008 14:19
A word of advice: you may get more response if you send plain-text
email. I suspect I'm not the only one here who is not a fan of HTML
email.
> I believe the line marked "/* 0 */" is illegal in C89, but legal in
C99.
> If I'm not mistaken, in C89, all variables declared inside a compound
> statement must be declared at the top of the compound statement.
Correct.
> In C99, I think the grammar for compound statements in section 6.8.2
> indicates this is no longer a restriction.
Correct.
> Splint version 3.1.2 (and, I believe, the latest dev version from cvs)
> report "Parse Error" for this code, giving the line number of the
marked
> line.
Correct. Splint is a C89 implementation.
I'm afraid I can't offer much advice for your larger question (whether
your patch, or some variation on it, should be accepted into the Splint
sources). I'm not even entirely sure Splint currently has a maintainer -
though I have a note from July 2007 indicating that Andy Lester had
agreed to take on that role.
One difficulty is C99 introduced quite a few changes, and it might be
incongruous, if not downright confusing, to only support one. Another is
that if people expect Splint to be a conforming C89 implementation, and
it silently accepts a C99ism, that could reasonably be considered a
false negative.
--
Michael Wojcik
Principal Software Systems Developer, Micro Focus
More information about the splint-discuss
mailing list