Safety-certified tools Tools for Automotive Applications C-STAT Static analysis C-RUN Runtime analysis Debugging and trace probes Build tools for Linux
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.