MISRA Discussion Forums

Full Version: Rule 16.9 - Error in code example
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The code in the normative text of rule 16.9 is:
Code:
if (f)     /* not compliant - gives a constant non-zero value which is
{             the address of f - use either f() or &f */
    /* ... */
}
Maybe it should be:
Code:
if (f)     /* not compliant - gives a constant non-zero value which is
              the address of f - use either f() or &f */
{
    /* ... */
}

Note - the opening brace was inside the comment.
A trivial error but maybe it should get corrected?
You are, of course, correct. And since this error has not been corrected in TC1, it should be put on the list for TC2 or C3, depending on which will be first ;-)
To the moderator: Is there a defined procedure for reporting such errors? Also for the Exemplar Suite (where I found at least one small error)?

Regards,

Johan
This is indeed a typo and was corrected in edition 2 of MISRA-C:2004.

The procedure for reporting errors, including errors in the exemplar suite, is to post to this forum.
Hi

I thought MISRA-C:2004 v2 was simply v1 + TC1.
There is no mention of this typo in TC1 so I assumed it still stood!
What other silent changes were incorporated into v2?
Is there a change log?
Cheers
Bill Forbes
Please see the reply to a similar question at http://www.misra.org.uk/forum/viewtopic.php?f=74&t=985

There is no change log at present.