Synopsis: | An identifier declared as a typedef, must not be redeclared in an inner scope without a type specifier. |
Language: | C |
Severity Level: | 4 |
Category: | DECLARATIONS |
Description: |
Example: Here, 'number' is a typedef for int which gets hidden by the declaration of an identifier 'number' with type int. Although the typedef is not visible at the static declaration, ANSI decided that the declaration might cause problems for compilers and made it undefined.typedef int number; ... { int number; /* hides typedef name */ ... { static number=0; /* shorthand for static int number=0; */ ... } ... } |