Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"declaration" in other rules
#1
Hello

Please teach me the definition of "Declaration" in MISRA-C:2012.

We have read the amplification of rule 8.5.
A member say, "MISRA-C declaration does not include definition, always."
And another member say, "normally, MISRA-C declaration is same as standard-C (include definition)."

We understand that the "Declaration" in Rule 8.5 does not contain "Definition".
In basically, does "Declaration" include "Definition" ?

Best Regards,
Satoshi Kawajiri
<t></t>
#2
By default, MISRA C:2012 uses the term "Declaration" to include both defining and non-defining declarations. For example rules 8.3, 8.8, 8.10. It also applies to rule 8.4, though multiple "defining declarations" are banned by rule 8.6.

"Defining declarations" are also referred to as "definitions" in some rules. For example rule 8.6

In the case of rules 8.5 and 8.11 the amplification is used to clarify that the rule only applies to non-defining declarations. An amplification was used in order so that the headline of the rule could be simplified.
Posted by and on behalf of the MISRA C Working Group


Forum Jump:


Users browsing this thread: 1 Guest(s)