MISRAC++2008-2-10-6 (C++ only)
In this section:
Synopsis
(Required) If an identifier refers to a type, it shall not also refer to an object or a function in the same scope.
Enabled by default
Yes
Severity/Certainty
Low/Medium

Full description
There is a clash with type names.
Coding standards
This check does not correspond to any coding standard rules.
Code examples
The following code example fails the check and will give a warning:
struct foo
{
int x;
};
void foo();
The following code example passes the check and will not give a warning about this issue:
void func()
{
typedef struct vector { int x ; int y; int z; } a_vector;
struct vector2 { int x ; int y; int z; } a_vector2;
}