Visible to Intel only — GUID: GUID-06072185-F1AE-4DF4-88CB-6388FA97F5F4
Visible to Intel only — GUID: GUID-06072185-F1AE-4DF4-88CB-6388FA97F5F4
fstrict-overflow, Qstrict-overflow
Determines whether strict overflow is enabled for signed addition, subtraction, and multiplication wrap arounds using twos-complement representation.
Syntax
Linux: |
-fstrict-overflow (for Clang compatibility) -fno-strict-overflow (for Clang compatibility) |
Windows: |
/Qstrict-overflow /Qstrict-overflow- |
Arguments
None
Default
-fstrict-overflow or /Qstrict-overflow |
Strict overflow is enabled for signed arithmetic overflow of addition, subtraction, and multiplication wrap arounds using twos-complement representation. |
Description
This option determines whether strict overflow is enabled for signed addition, subtraction, and multiplication wrap arounds using twos-complement representation.
Integer overflow occurs when an operation on two integer values results in a value that is too large to be represented in an integer of the size specified; for example, two 32-bit integers added together result in a value that does not fit into 32 bits.
When overflow occurs, as much of the value as can fit into the result is assigned, usually resulting in a negative number.
When -fstrict-overflow (Linux) or /Qstrict-overflow (Windows) is in effect, the compiler assumes that integer operations can never overflow . This can provide better optimizations. However, if overflow does occur, the resulting behavior is undefined.
If your program relies on integer overflow to work, specify -fno-strict-overflow (Linux) or /Qstrict-overflow- (Windows). This permits overflow but may produce less optimized code.
This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.
IDE Equivalent
Alternate Options
None
Example
The following shows an example of using this option:
ifx /Qstrict-overflow- rnflow.f90