RESTRICT | NORESTRICT (C only)
Category
Optimization and tuning
Pragma equivalent
None.
Purpose
Indicates to the compiler that no other pointers can access the same memory that has been addressed by function parameter pointers.
Syntax
Defaults
NORESTRICT
When NORESTRICT
is in effect, no function parameter pointers are restricted unless
the restrict
attribute is specified in the source.
Parameters
function_name is a comma-separated list. If you do not specify the function_name, parameter pointers in all functions are treated as restrict. Otherwise, only those parameter pointers in the listed functions are treated as restrict.
Usage
The RESTRICT option indicates to the
compiler that pointer parameters in all functions or in specified
functions are disjoint. This is equivalent to adding the restrict
keyword
to the parameter pointers within the required functions, but without
having to modify the source file. When RESTRICT is in effect, deeper
pointer analysis is done by the compiler and performance of the application
being compiled is improved.
The usage status of this option is inserted in the object file to aid you in diagnosing a problem with your program.
Predefined macros
None.