[previous] 1304 [next] Old style definition of function '%s()' is not portable to C++.
Functions

This is an old style function definition containing an identifier list and separate parameter declarations. This is an obsolescent language feature and is not recommended. (It is also not supported in C++). Using ISO prototype syntax to declare and define function interfaces provides much better type checking; but be careful not to mix the 2 styles.

Messages 1304 and 3002 are functionally identical.

For example:


/*PRQA S 2017,3206,3408 ++*/


extern int foo1(p)              /* Message 1304 and 3002 - "old style" */
int p;
{
    return 1;
}

extern int foo2(int p)          /* ISO style header - "new style"      */
{
    return 1;
}


No MISRA C:2012 Rules applicable to message 1304


See also:

QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents