AR# 31999

|

11.1 EDK - "warning: integer constant is too large for 'long' type"

Description

When I define a long long integer data type in SW application in EDK, a warning / error similar to the following occurs:

"warning: integer constant is too large for 'long' type".

Example:

int main ()

{

long long int test = 0x0008888000000000;

},

Solution

The warning message can be safely ignored, as mb-gcc is not doing anything wrong; the 64-bit computing is in fact correct.

This warning occurs because gcc is strict in syntax and requires LL on the end of such constants. This warning message disappears if the integer is appended with LL.

long long int test = 0x0008888000000000LL;

AR# 31999
Date 12/15/2012
Status Active
Type General Article
People Also Viewed