11-05-2015, 07:54 AM
The use of tag in a typedef is not a violation of rule 2.4, unless the only occurrence of the tag appears in the typedef declaration.
Code:
struct A { ... }; // compliant
typedef struct A Atype;
Atype ax;
// no subsequent use of identifier "A"
typedef struct B { ... } Btype; // non-compliant
Btype bx;
// no subsequent use of identifier "B"
typedef struct { ... } Ctype; // compliant
Ctype cx;
Posted by and on behalf of the MISRA C Working Group