-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-12282
-
-
-
default
-
To avoid the issue use option --c99
In C, the expression -2147483648L is not a constant. It is the unary negation of the constant 2147483648L. For a target where long is a 32-bit type, this constant is outside the range of values for a long, so this expression invokes undefined behavior for both C89 and C99. The compiler is not required to ensure that the expression (-2147483648L > 0) evaluates to 0, or even to successfully compile this expression at all. As a quality-of-implementation issue, the compiler may choose to emit a diagnostic indicating that this integer constant is out of range. This defect report states that the compiler fails to emit such a diagnostic in C89 mode, even though it does emit such a diagnostic in C99 mode.