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

alias-const, Qalias-const

Determines whether the compiler assumes a parameter of type pointer-to-const does not alias with a parameter of type pointer-to-non-const.

Syntax

Linux:

-alias-const

-no-alias-const

macOS:

-alias-const

-no-alias-const

Windows:

/Qalias-const

/Qalias-const-

Arguments

None

Default

-no-alias-const
or /Qalias-const-

The compiler uses standard C/C++ rules for the interpretation of const.

Description

This option determines whether the compiler assumes a parameter of type pointer-to-const does not alias with a parameter of type pointer-to-non-const. It implies an additional attribute for const.

This functionality complies with the input/output buffer rule, which assumes that input and output buffer arguments do not overlap. This option allows the compiler to do some additional optimizations with those parameters.

In C99, you can also get the same result if you additionally declare your pointer parameters with the restrict keyword.

IDE Equivalent

Visual Studio: None

Eclipse: Data > Assume Restrict Semantics for Const

Xcode: Data > Assume Restrict Semantics for Const

Alternate Options

None