Next: , Previous: Float_Equality_Checks, Up: Predefined Rules


23.7.22 Forbidden_Attributes

Flag each use of the specified attributes. The attributes to be detected are named in the rule's parameters.

This rule has the following parameters:

Parameters are not case sensitive. If Attribute_Designator does not have the syntax of an Ada identifier and therefore can not be considered as a (part of an) attribute designator, a diagnostic message is generated and the corresponding parameter is ignored. (If an attribute allows a static expression to be a part of the attribute designator, this expression is ignored by this rule.)

When more then one parameter is given in the same rule option, the parameters must be separated by commas.

If more then one option for this rule is specified for the gnatcheck call, a new option overrides the previous one(s).

The +R option with no parameters turns the rule ON, with the set of attributes to be detected defined by the previous rule options. (By default this set is empty, so if the only option specified for the rule is +RForbidden_Attributes (with no parameter), then the rule is enabled, but it does not detect anything). The -R option with no parameter turns the rule OFF, but it does not affect the set of attributes to be detected.