![]() |
![]() |
3007 | ![]() |
||||
![]() | |||||||
| Functions | REFERENCE - ISO:C90-6.5.4.3 Function Declarators (Including Prototypes) - Semantics, ISO:C90-6.7.1 Function Definitions - Constraints | ||||||
A function is being defined with an empty parameter-list. Functions can be defined with no parameters using either an empty parameter-list or a list consisting of the single keyword "void". There is no semantic difference and the choice is a matter of style. However, when declaring a function with no parameters, the use of "void" is important.
/*PRQA S 1303,2017,3408 ++*/
extern int f1()
{ /* Message 3007 */
return 1;
}
extern int f2(void)
{
return 1;
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |