MIRCA 2004 Rule 1.1

6.1 Environment

Moderators: misra-c, david ward

Locked
vkmet
Posts: 1
Joined: Mon Jul 03, 2006 9:38 am

MIRCA 2004 Rule 1.1

Post by vkmet » Tue Jul 04, 2006 9:23 am

Hi,

MISRAC 2004 Rule 1.1 refers to the environment limits specified in section 5.2.4 of the ISO 9899:1990 standard.

According to this rule, should all the limits specified by this section be STRICTLY followed, or only the one limit on internal and extrenal identifier length be strictly followed (Rule 5.1). Is a piece of code having 128 nesting levels of blocks MISRAC compliant?

Also there is a mention of the need to have certain compiler extentions in the code. Is a piece of code, having certain compiler extentions MISRA compliant? Or is it upto the organisation to decide that?

Best Regards
Vkmet

bmerkle
Posts: 9
Joined: Mon Nov 15, 2004 6:44 am

Post by bmerkle » Fri Jul 21, 2006 7:00 am

I am not speaking for the MISRA-C team but here some thoughts:

- regarding compliance and claiming compliance you should consult chapter 4.4 of the MISRA-C-2004 document. I think then is clear.

- a key advantage of MISRA-C-2004 against the old (1998) version is the deviation procedure (see chapter 4.3.2). It is ok to deviate from rules and you are still compliant if you document and comment all deviations i your code.

- there are two types of deviations, project deviation and specific deviation. again see 4.3.2 for details.

- especially looking at rule 1.1 which you are referring to there were modifications between MISRA-C 2004 and 1998. (plus the deviation procedure). Now it is (IMO) legal and you are still misra-compliant if you use specific extensions of your embedded comipler AS LONG as you document them and comment why.
In essence this is what extensions are for. You WANT to use the optimizations of your platform and MISRA-C-2004 does not block this.

kind regards,
Bernhard.

Locked

Return to “6.1 Environment”