Ada Programming/Attributes/'Enabled

Description
The  attribute allows an application program to check at compile time to see if the designated check is currently enabled. The prefix is a simple identifier, referencing any predefined check name (other than ) or a check name introduced by pragma Check_Name. If no argument is given for the attribute, the check is for the general state of the check, if an argument is given, then it is an entity name, and the check indicates whether an  or   has been given naming the entity (if not, then the argument is ignored).

Note that instantiations inherit the check status at the point of the instantiation, so a useful idiom is to have a library package that introduces a check name with, and then contains generic packages or subprograms which use the   attribute to see if the check is enabled. A user of this package can then issue a  or   before instantiating the package or subprogram, controlling whether the check will be present.