Pragma User_Aspect_Definition (GNAT Reference Manual)

### 2.193 Pragma User_Aspect_Definition ¶

Syntax:

    pragma User_Aspect_Definition
      (Identifier {, Identifier [(Identifier {, Identifier})]});

This configuration pragma defines a new aspect, making it available for subsequent use in a User_Aspect aspect specification. The first identifier is the name of the new aspect. Any subsequent arguments specify the names of other aspects. A subsequent name for which no parenthesized arguments are given shall denote either a Boolean-valued non-representation aspect or an aspect that has been defined by another User_Aspect_Definition pragma. A name for which one or more arguments are given shall be either Annotate or Local_Restrictions (and the arguments shall be appropriate for the named aspect).

This pragma, together with the User_Aspect aspect, provides a mechanism for avoiding textual duplication if some set of aspect specifications is needed in multiple places. This is somewhat analogous to how profiles allow avoiding duplication of Restrictions pragmas.

The visibility rules for an aspect defined by a User_Aspect_Definition pragma are the same as for a check name introduced by a Check_Name pragma. If multiple definitions are visible for some aspect at some point, then the definitions must agree. A predefined aspect cannot be redefined.