[previous] MISRA-C:2004  Rule  8.2:  (Required) [next] Whenever an object or function is declared or defined, its type shall be explicitly stated.

extern         x;           /* Non-compliant - implicit int type */
extern int16_t x;           /* Compliant - explicit type         */
const          y;           /* Non-compliant - implicit int type */
const  int16_t y;           /* Compliant - explicit type         */
static         foo( void ); /* Non-compliant - implicit type     */
static int16_t foo( void ); /* Compliant - explicit type         */


QAC messages that encompass this guideline:

2050 The 'int' type specifier has been omitted from a function declaration.
2051 The 'int' type specifier has been omitted from an object declaration.



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