Closed
Description
Affected rules
RULE-10-4
Description
This rule has a number of issues related to how essential types are resolved:
- The essential type of an enum type is not considered after resolving typedefs and removing specifiers.
- The essential type of an anonymous enum (as specified by MISRA) is not considered to be essentially signed.
\n
is not considered to be char type.
Example
void example_function(char c, int i) {
typedef enum { A } EA;
EA ea = A;
ea == A; // COMPLIANT[FALSE_POSITIVE]
c == `\n`; // COMPLIANT[FALSE_POSITIVE]
enum { B };
i == B; // COMPLIANT[FALSE_POSITIVE]
}