Next: , Previous: Pragma Universal_Data, Up: Implementation Defined Pragmas

Pragma Unreferenced


     pragma Unreferenced (local_Name {, local_Name});

This pragma signals that the entities whose names are listed are deliberately not referenced in the current source unit. This suppresses warnings about the entities being unreferenced, and in addition a warning will be generated if one of these entities is in fact referenced in the same unit as the pragma (or in the corresponding body, or one of its subunits).

This is particularly useful for clearly signaling that a particular parameter is not referenced in some particular subprogram implementation and that this is deliberate. It can also be useful in the case of objects declared only for their initialization or finalization side effects.

If local_Name identifies more than one matching homonym in the current scope, then the entity most recently declared is the one to which the pragma applies.

The left hand side of an assignment does not count as a reference for the purpose of this pragma. Thus it is fine to assign to an entity for which pragma Unreferenced is given.