Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MIRCA 2004 Rule 1.1

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
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,

Forum Jump:

Users browsing this thread: 1 Guest(s)