[previous] MISRA C:2012  Rule-8.4:  (Required) [next] A compatible declaration shall be visible when an object or function with external linkage is defined

Amplification:

A compatible declaration is one which declares a compatible type for the object or function being defined.

Example Code:


#pragma PRQA_MESSAGES_OFF 2017

#include "misra.h"
#include "m3cmex.h"

int16_t obj0804 = 1;                    /* 3408 */

extern int16_t rule_0804(void)
{
    return 1;
}


QAC messages that encompass this guideline:

3408 '%s' has external linkage and is being defined without any previous declaration.



(c) The Motor Industry Research Association, 2012
QA C Source Code Analyser 8.1.2
MISRA C:2012 Compliance Module 1.0
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents