Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 8.6: External declaration without definition
#1
I have a header file MISRA_8.6.h, in which a variable is declared:
Code:
extern signed short int Variable;

And I have the corresponding c-file MISRA_8.6.c, which uses the variable as input.
Code:
#include "MISRA_8.6.h"

signed short int A;

void main(void)
{

    /*8.6*/
    A = Variable;
    
}

The c-file defining the variable is out of scope. Is rule 8.6 violated by this setting or is another rule 8.x violated?
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)