Synopsis: | Only one identifier type shall be declared on each source line. |
Language: | C |
Severity Level: | 8 |
Category: | Declarations |
Description: |
Justification Using one declaration on a line the code will become more readable and in the case of pointer declarations not result in unexpected behavior. Besides, to be able to determine the amount of software, a uniform way of declaring variables is required. Example int* i, j; /* WRONG: i is a pointer, j isn't */ long l; char c; /* WRONG */ int* m; /* RIGHT */ int n; /* RIGHT */ int i, j; /* RIGHT */ |