![]() |
![]() |
3002 | ![]() |
||||
![]() | |||||||
| Functions | REFERENCE - ISO:C90-6.9.5 Future Language Directions | ||||||
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 3002 and 1304 are functionally identical. For example:
/*PRQA S 2017,3206,3408 ++*/
extern int foo1(p) /* Message 3002 and 1304 - "old style" */
int p;
{
return 1;
}
extern int foo2(int p) /* ISO style header - "new style" */
{
return 1;
}
MISRA C:2012 Rules applicable to message 3002:
| Rule-8.2 (Required) | Function types shall be in prototype form with named parameters |
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 |