[previous] MISRA C:2012  Rule-8.6:  (Required) [next] An identifier with external linkage shall have exactly one external definition

Example Code:


#pragma PRQA_MESSAGES_OFF 3408

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

int16_t obj_0806a = 3;
int16_t obj_0806a = 4;               /* 0630 */


extern int16_t rule_0806(void)
{
    return obj_0806c;
}


QAC messages that encompass this guideline:

0630 [U] More than one definition of '%s' (with external linkage).
1509 '%1s' has external linkage and has multiple definitions.
3406 Object/function '%s', with external linkage, has been defined in a header file.


Related rules:

Rule-1.3 There shall be no occurrence of undefined or critical unspecified behaviour



(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