Implementation Defined Aspects (GNAT Reference Manual) (original) (raw)
Next: Implementation Defined Attributes, Previous: Implementation Defined Pragmas, Up: GNAT Reference Manual [Contents][Index]
Ada defines (throughout the Ada 2012 reference manual, summarized in Annex K) a set of aspects that can be specified for certain entities. These language defined aspects are implemented in GNAT in Ada 2012 mode and work as described in the Ada 2012 Reference Manual.
In addition, Ada 2012 allows implementations to define additional aspects whose meaning is defined by the implementation. GNAT provides a number of these implementation-defined aspects which can be used to extend and enhance the functionality of the compiler. This section of the GNAT reference manual describes these additional aspects.
Note that any program using these aspects may not be portable to other compilers (although GNAT implements this set of aspects on all platforms). Therefore if portability to other compilers is an important consideration, you should minimize the use of these aspects.
Note that for many of these aspects, the effect is essentially similar to the use of a pragma or attribute specification with the same name applied to the entity. For example, if we write:
type R is range 1 .. 100 with Value_Size => 10;
then the effect is the same as:
type R is range 1 .. 100; for R'Value_Size use 10;
and if we write:
type R is new Integer with Shared => True;
then the effect is the same as:
type R is new Integer; pragma Shared (R);
In the documentation below, such cases are simply marked as being boolean aspects equivalent to the corresponding pragma or attribute definition clause.
- Aspect Abstract_State
- Aspect Always_Terminates
- Aspect Annotate
- Aspect Async_Readers
- Aspect Async_Writers
- Aspect Constant_After_Elaboration
- Aspect Contract_Cases
- Aspect Depends
- Aspect Default_Initial_Condition
- Aspect Dimension
- Aspect Dimension_System
- Aspect Disable_Controlled
- Aspect Effective_Reads
- Aspect Effective_Writes
- Aspect Exceptional_Cases
- Aspect Exit_Cases
- Aspect Extensions_Visible
- Aspect Favor_Top_Level
- Aspect Ghost
- Aspect Ghost_Predicate
- Aspect Global
- Aspect Initial_Condition
- Aspect Initializes
- Aspect Inline_Always
- Aspect Invariant
- Aspect Invariant’Class
- Aspect Iterable
- Aspect Linker_Section
- Aspect Local_Restrictions
- Aspect Lock_Free
- Aspect Max_Queue_Length
- Aspect No_Caching
- Aspect No_Elaboration_Code_All
- Aspect No_Inline
- Aspect No_Raise
- Aspect No_Tagged_Streams
- Aspect No_Task_Parts
- Aspect Object_Size
- Aspect Obsolescent
- Aspect Part_Of
- Aspect Persistent_BSS
- Aspect Predicate
- Aspect Pure_Function
- Aspect Refined_Depends
- Aspect Refined_Global
- Aspect Refined_Post
- Aspect Refined_State
- Aspect Relaxed_Initialization
- Aspect Remote_Access_Type
- Aspect Scalar_Storage_Order
- Aspect Secondary_Stack_Size
- Aspect Shared
- Aspect Side_Effects
- Aspect Simple_Storage_Pool
- Aspect Simple_Storage_Pool_Type
- Aspect SPARK_Mode
- Aspect Subprogram_Variant
- Aspect Suppress_Debug_Info
- Aspect Suppress_Initialization
- Aspect Test_Case
- Aspect Thread_Local_Storage
- Aspect Universal_Aliasing
- Aspect Unmodified
- Aspect Unreferenced
- Aspect Unreferenced_Objects
- Aspect User_Aspect
- Aspect Value_Size
- Aspect Volatile_Full_Access
- Aspect Volatile_Function
- Aspect Warnings