Synopsis: | When structures are accessed by means of a pointer, the pointer-to notation -> rather than the member notation * shall be used to denote a specified member of the structure. |
Language: | C |
Severity Level: | 8 |
Category: | Expressions |
Description: |
Justification The pointer-to notation is more clear when reading the code, since it looks less cluttered and it becomes obvious that a member of a struct or union is meant. Example i = p->value; /* RIGHT */ i = (*p).value; /* WRONG */ |