Synopsis: | Do not use K&R declaration style. |
Language: | C |
Severity Level: | 6 |
Category: | External Definitions |
Description: |
Justification K&R declaration style is not supported in C++. So programs will not be portable from C to C++ if they use this style of declaration. Example int foo(a, p) /* WRONG, K&R style */ int a; char* p; { return 0; } int foo(int a, char* p) /* RIGHT, ANSI style */ { return 0; } |