-qstrict_induction

Category

Optimization and tuning

Pragma equivalent

None.

Purpose

Prevents the compiler from performing induction (loop counter) variable optimizations. These optimizations may be unsafe (may alter the semantics of your program) when there are integer overflow operations involving the induction variables.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-strict_induction---.   
>>- -q--+-nostrict_induction-+---------------------------------><

Defaults

Usage

When using -O2 or higher optimization, you can specify -qstrict_induction to prevent optimizations that change the result of a program if truncation or sign extension of a loop induction variable should occur as a result of variable overflow or wrap-around. However, use of -qstrict_induction is generally not recommended because it can cause considerable performance degradation.

Predefined macros

None.

Related information