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

Rule:  6.7.5.3.a

Synopsis:All function prototypes shall specify the type and the name of each of their parameters.
Language:C
Severity Level:2
Category:Declarations


Description:

Justification

Without declaration there is no prototype checking and that is error-prone.

Example

static int ccbb_f(); /* WRONG: old style declaration */
static int ccbb_f(float); /* WRONG: incomplete declaration */

static int ccbb_f(float angle); /* RIGHT: type & name of parameter mentioned */

static int ccbb_f(angle) /* WRONG: old style definition */
float  angle;
{
}

static int ccbb_f(float angle) /* RIGHT: ANSI style definition */
{
}