| |||||
Technical Support Support Resources
Product Information | ARMCC: WARING #61-D: INTEGER OPERATION RESULT IS OUT OF RANGEInformation in this article applies to:
QUESTIONI have written the following code: unsigned int i; i = (u32)(3<<30); However this generates a warning: warning: #61-D: integer operation result is out of range Can I avoid this warning somehow? ANSWERThe compiler overflow warning is correct, because the expression 3<<30 represents a signed int. To avoid the warning, explicitly define the constant 3 as an unsigned value using the U postfix. For example: unsigned int i; i = (u32)(3U<<30); MORE INFORMATION
SEE ALSOLast Reviewed: Wednesday, November 15, 2006 | ||||
| |||||