"declaration" in other rules

Moderators: misra-c, david ward

Post Reply
satoshi
Posts: 7
Joined: Fri Oct 18, 2013 2:31 am
Company: Renesas Solutions Corp.

"declaration" in other rules

Post by satoshi » Thu Dec 11, 2014 4:48 am

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

misra-c
Posts: 571
Joined: Thu Jan 05, 2006 1:11 pm

Re: "declaration" in other rules

Post by misra-c » Fri Dec 19, 2014 1:27 pm

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

Post Reply

Return to “8.8 Declarations and defnitions”