Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

restrict, Qrestrict

Determines whether pointer disambiguation is enabled with the restrict qualifier.

Syntax

Linux:

-restrict

-no-restrict

macOS:

-restrict

-no-restrict

Windows:

/Qrestrict

/Qrestrict-

Arguments

None

Default

-no-restrict or /Qrestrict-

Pointers are not qualified with the restrict keyword.

Description

This option determines whether pointer disambiguation is enabled with the restrict qualifier. Option -restrict and /Qrestrict enable 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.

IDE Equivalent

Visual Studio: Language > Recognize The Restrict Keyword

Eclipse: Language > Recognize The Restrict Keyword

Xcode: Language > Recognize RESTRICT keyword

Alternate Options

None

See Also