Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 16.9 - Error in code example
#1
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?
<t></t>
Reply
#2
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
<r>Johan Bezem<br/>
Email: <EMAIL email="[email protected]">[email protected]</EMAIL><br/>
Tel: +49 172 5463210<br/>
Web: <URL url="http://www.bezem.de/">http://www.bezem.de/</URL></r>
Reply
#3
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.
Posted by and on behalf of the MISRA C Working Group
Reply
#4
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
<t></t>
Reply
#5
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.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)