TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - C Coding Standard
Search

SR:  8.9#1Checked automatically with code checker

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:

typedef int number;
...
{
int number; /* hides typedef name */
...
{
static number=0;
/* shorthand for static int number=0; */
...
}
...
}
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.