Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 8.11(req) - Clarification required
#1
Dear Misra

I seek clarification on the particular meaning of this rule. From the rule statment I take it that everything declared at file scope and only used internally should have the static storage class specifier applied.

For example the following would be a violation, ignoring the violation of rule 8.7.
Code:
int32_t var=0; /*VIOLATION, static should be applied*/

int32_t main(void)
{
var++;
return(var);
}

however I take a different meaning from the additional description given. I feel it is more related to the mixing use of extern and static.

Code:
extern int32_t var1;
static int32_t var1=0; /*Violation??*/

I would like to know which violation represents the meaning of this rule.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)