-
Notifications
You must be signed in to change notification settings - Fork 1
Pragma Scopes
A pragma annotates a syntactic entity is is associated with. The pragma is said to have the scope of the syntactic entity. There are 17 categories.
File Scope, Module Scope, Constant Scope, Variable Scope, Array Scope, Record Scope, Field List Scope, Field List Item Scope, Procedure Type Scope, Formal Type List Scope, Formal Type List Iten Scope, Other Type Scope, Procedure Scope, Parameter List Scope, Single Parameter Scope, Point-Forward Scope, No Scope.

Pragmas with file scope apply to the entire file. The following pragmas always have file scope:
ENCODING,
VARIANT and
GENERATED.
Pragmas with module scope apply to the module. The following pragmas always have module scope:
PRIVATETO,
GC,
ARC,
ABI and
FFI.
Whereas the following pragmas may have module scope, depending on their placement.
ALIGN and
DEPRECATED.
Pragmas with constant scope apply to a constant.
Pragma DEPRECATED
may have constant scope, depending on its placement.
Pragmas with variable scope apply to a variable. The following pragmas always have variable scope:
ADDR,
SINGLEASSIGN and
VOLATILE.
The following pragmas may have variable scope, depending on their placement.
ALIGN,
BORROWER,
DEPRECATED,
FFIDENT,
LOWLATENCY and
OWNER.
Pragmas with array scope apply to an array type. The following pragmas may have array scope, depending on their placement.
ALIGN and
DEPRECATED.
Pragmas with record scope apply to a record type. The following pragmas always have record scope:
The following pragmas may have record scope, depending on their placement.
ALIGN and
DEPRECATED.
Pragmas with field list scope apply to a record field list. The following pragmas may have field list scope, depending on their placement.
ALIGN,
DEPRECATED and
PADBITS.
Pragmas with field list item scope apply to a single record field within a field list. The following pragmas may have field list item scope, depending on their placement.
ALIGN,
DEPRECATED and
PADBITS.
Pragmas with procedure type scope apply to a procedure type. The following pragmas may have procedure scope, depending on their placement.
DETM,
INLINE,
NOINLINE,
NORETURN,
PURE,
WEAK.
DEPRECATED.
Pragmas with formal type list scope apply to a procedure type's formal type list. The following pragmas may have formal type list scope, depending on their placement.
BORROWER,
IN,
LOWLATENCY,
OUT and
OWNER.
Pragmas with formal type list item scope apply to a single formal type within a procedure type's formal type list. The following pragmas may have formal type list item scope, depending on their placement.
BORROWER,
IN,
LOWLATENCY,
OUT and
OWNER.
Pragmas with other type scope apply to any type other than record types. The following pragmas may have type scope, depending on their placement.
ALIGN and
DEPRECATED.
Pragmas with procedure scope apply to a procedure. The following pragmas always have procedure scope:
The following pragmas may have procedure scope, depending on their placement.
ADDR,
FFIDENT,
DEPRECATED,
DETM,
INLINE,
NOINLINE,
NORETURN,
PURE and
WEAK.
Pragmas with parameter list scope apply to a procedure's formal parameter list. The following pragmas may have parameter list scope, depending on their placement.
BORROWER,
IN,
LOWLATENCY,
OUT and
OWNER.
Pragmas with parameter list item scope apply to a single parameter within a procedure's formal parameter list. The following pragmas may have parameter list item scope, depending on their placement.
BORROWER,
IN,
LOWLATENCY,
OUT and
OWNER.
Pragmas with point-forward scope apply from the point forward where they are placed. The following parameters always have point-forward scope:
ENDFWD,
FORWARD,
PRESETS and
UNSET.
Pragmas without scope do not apply to any syntactic entity. The following pragmas are always without scope: