[previous] 3480 [next] Object/function '%s', with internal linkage, has been defined in a header file.
Declarations and definitions

An object or function with internal linkage has been defined inside a header file. Header files usually contain macro definitions and declarations of typedefs, tags, objects and functions with external linkage. Conventionally, a header file is included in multiple translation units because its primary function is to provide a way of using such items throughout a project without code duplication.

An object or function should be defined in one translation unit only. It follows that such definitions should not be present in a header file except in the unusual situation where the header file is to be included in just one translation unit.


No MISRA C:2012 Rules applicable to message 3480


See also:

QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents