Hello,
I have added U postfix to the integer but the problem still is the same.
I read following pages but didn't work. http://www.keil.com/support/docs/3243.htm http://www.keil.com/forum/14703/
#define M(x) (u32)(1U << (x%32)) enum{ eFirst = M(x) ..... eLast = M(31) // generate "integer operation result is out of range" }
Can I avoid this warning?
1440 The expression that defines the value of an enumeration constant shall be an integer constant expression that has a value representable as an int.
Taken from:
c0x.coding-guidelines.com/6.7.2.2.html
Since int is signed, you cannot have a value greater that what can be put into an int. You are using a value beyond that limit, so you have a problem.