![]() |
![]() |
0651 | ![]() |
||||
![]() | |||||||
| 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 */
MISRA C:2012 Rules applicable to message 0651:
| Rule-1.1 (Required) | The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits |
![]() | ||
| 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 |