Next: , Previous: Positional_Parameters, Up: Predefined Rules


23.7.56 Predefined_Numeric_Types

Flag each explicit use of the name of any numeric type or subtype defined in package Standard.

The rationale for this rule is to detect when the program may depend on platform-specific characteristics of the implementation of the predefined numeric types. Note that this rule is over-pessimistic; for example, a program that uses String indexing likely needs a variable of type Integer. Another example is the flagging of predefined numeric types with explicit constraints:

         subtype My_Integer is Integer range Left .. Right;
         Vy_Var : My_Integer;

This rule detects only numeric types and subtypes defined in Standard. The use of numeric types and subtypes defined in other predefined packages (such as System.Any_Priority or Ada.Text_IO.Count) is not flagged

This rule has no parameters.