I get the message:
Warning[Pe1297]: constant is too large for long long; given unsigned long long type (nonstandard)
.. when using the decimal constant 2147483648.
#define LONG_MIN (-2147483647-1)
The standard says the type of a decimal constant without suffix shall be the first that matches in the following list:
int, long int, long long int
The constant 2147483648 (= 0x8000 0000) does not fit in a long long int.
The compiler handles this by using unsigned long long int for the constant, and gives an appropriate warning.
Type casts, e.g.,
/*...*/ (unsigned long long) 2147483648; /*...*/
are not applied until after the constant has a type. See also Technical Note 60149.
All product names are trademarks or registered trademarks of their respective owners.
© IAR Systems 1995-2021 - All rights reserved.
We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies