restrict, Qrestrict

Enables pointer disambiguation with the restrict qualifier.

IDE Equivalent

Windows: C/C++ > Language > Recognize the Restrict Keyword

Linux: Language > Recognize the Restrict Keyword

Mac OS: None

Architectures

IA-32 architecture, Intel® 64 architecture, IA-64 architecture

Syntax

Linux and Mac OS: -restrict
    -no-restrict
Windows:    /Qrestrict
    /Qrestrict-

Arguments

None

Default

OFF      Pointers are not qualified with the restrict keyword.

Description

This option enables pointer disambiguation with the restrict qualifier. It enables the recognition of the restrict keyword as defined by the ANSI standard.

By qualifying a pointer with the restrict keyword, you assert that an object accessed by the pointer is only accessed by that pointer in the given scope. You should use the restrict keyword only when this is true. When the assertion is true, the restrict option will have no effect on program correctness, but may allow better optimization.

Alternate Options

None

See Also