STRICT | NOSTRICT

Category

Optimization and tuning

Pragma equivalent

#pragma option_override(subprogram_name, "OPT(STRICT)").

Purpose

Used to prevent optimizations done by default at optimization levels OPT(3), and, optionally at OPT(2), from re-ordering instructions that could introduce rounding errors.

When the STRICT option is in effect, the compiler performs computational operations in a rigidly-defined order such that the results are always determinable and recreatable.

When the NOSTRICT compiler option is in effect, the compiler can reorder certain computations for better performance. However, the end result may differ from the result obtained when STRICT is specified.

Syntax

For NOOPT and OPT(2):

Read syntax diagramSkip visual syntax diagram
                .-SUBSCRIPTWRAP---.        
   .-STRICT--(--+-NOSUBSCRIPTWRAP-+--)-.   
>>-+-NOSTRICT--------------------------+-----------------------><

For OPT(3):

Read syntax diagramSkip visual syntax diagram
   .-NOSTRICT--------------------------.   
   |            .-NOSUBSCRIPTWRAP-.    |   
>>-+-STRICT--(--+-SUBSCRIPTWRAP---+--)-+-----------------------><

Defaults

For NOOPT and OPT(2), the default option is STRICT. For OPT(3), the default option is NOSTRICT.

Usage

STRICT disables the following optimizations:

In IEEE floating-point mode, NOSTRICT sets FLOAT(MAF). To avoid this behavior, explicitly specify FLOAT(NOMAF).

STRICT(SUBSCRIPTWRAP) prevents the compiler from assuming that array subscript expressions will never overflow.

When the NOSTRICT or STRICT(NOSUBSCRIPTWRAP) option is in effect, the compiler is free to perform operations which might be unsafe when there are integer overflow operations involving array subscript expressions.

The [NO]STRICT_INDUCTION setting supersedes STRICT([NO]SUBSCRIPTWRAP) or NOSTRICT, when induction variables are present in the array subscript expressions.

When STRICT settings in source level pragmas conflict with compilation unit STRICT settings, the settings in the source level pragmas are applied.

IPA effects

The STRICT settings for each compilation unit and procedure are preserved from the IPA compile step and respected during the IPA link step. You cannot override the setting of STRICT by specifying the option on the IPA link step. If you specify the STRICT option on the IPA link step, the compiler issues a warning message and ignores the STRICT option. For more information about the IPA link processing of the STRICT option, see FLOAT.

Predefined macros

None.