[previous] 0649 [next] [C] K&R style declaration of parameters is not legal after a function header that includes a parameter list.
Constraint violations REFERENCE - ISO:C90-6.5.4.3 Function Declarators - Constraints, ISO:C90-6.7.1 Function Definitions - Constraints

This is a constraint error

The format of this function header is a mixture of old and new styles - a function prototype has been followed by a declaration list in K&R style. This is not allowed. For example:


/*PRQA S 553,1304,3002,3206,3219,3227,3408,3450 ++*/

int f1(int x, int y)      /* OK - "new-style" prototype declaration */
{
    return 1;
}

int f2(x, y)              /* OK - "old-style" K&R declaration       */
int x;
int y;
{
    return 1;
}

int f3(int x)
int y;                    /* Message 0649 - neither old nor new     */
{
    return 1;
}

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