TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
ASML C Coding Standard
Search

Rule:  6.7.2.bChecked automatically with code checker

Synopsis:Every identifier declaration shall include a type specifier.
Language:C
Severity Level:6
Category:Declarations


Description:

Justification

Omitting the type specifier results in an implicit "int" type specifier for the declaration. Strict definition of interfaces protects the user against inconsistently defined interfaces and is good programming practice.

Example 1

extern CCBB_i; /* WRONG: implicit int type */

extern int CCBB_i; /* RIGHT */

Example 2

unsigned CCBB_i; /* WRONG: implicit int type */

unsigned int CCBB_i; /* RIGHT */

Example 3

CCBB_f(long a) /* WRONG: implicit int return type */
{
}

int CCBB_f(long a) /* RIGHT */
{
}