06-03-2015, 02:47 PM
What is the essential type of an enumerated constant? I believe it should be integer constant, and rule 10.3 seems to agree since it says this expression is compliant:
s8a = K1; /* constant value fits */
However, my static analyzer insists that this is a violation:
s8a = K1; /* constant value fits */
However, my static analyzer insists that this is a violation:
Code:
enum list {
ONE,
TWO,
THREE,
}
int c;
for( c = 0; c < THREE; c++ ) /* THREE is an integer constant so comparing it with c, an int, is not a violation */
....
<t></t>