[previous] 0651 [next] [C] Missing type specifiers in function declaration.
Constraint violations REFERENCE - ISO:C90-6.5.4.3 Function Declarators - Constraints

This is a constraint error

This is not a valid way to declare a function; type specifiers have been omitted from the parameter list. There are 2 ways to declare and define functions, an old style and a new style; this declaration conforms to neither.

For example:


/*PRQA S 1303,1304,3001,3002,3206,3210,3408,3447 ++*/

extern void f1( );              /* OK - "old style" function declaration */

extern void f2(a, b)            /* OK - "old-style" function definition  */
int a;
int b;
{
}

extern void f3(int a, int b );  /* OK - "new style" function declaration */

extern void f4(int a, int b)    /* OK - "new-style" function definition  */
{
}

extern void f5(a, b);           /* Message 0651 - invalid declaration    */

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents