Ramification: For case_statements,
this includes values outside the range of the static subtype (if any)
to be covered by the choices. It even includes values outside the base
range of the case expression's type, since values of numeric types (and
undefined values of any scalar type?) can be outside their base range.

{AI05-0153-3}
{AI05-0188-1}
{AI05-0262-1}
{AI12-0071-1}
If the discriminant is of a static constrained scalar subtype then, except
within an instance of a generic unit, each non-othersdiscrete_choice
shall cover only values in that subtype that satisfy its predicates predicate,
and each value of that subtype that satisfies its predicates predicate
shall be covered by some discrete_choice
[(either explicitly or by others)];

Implementation Note: This is not a “check”;
it cannot be suppressed. However, in most cases it is not necessary to
generate any code to raise this exception. A test is needed (and can
fail) in the case where the discriminant subtype has a Static_Predicate
specified, it also has predicate checking disabled, and the discriminant
governs a variant_part
which lacks a when others choice.

The test also could fail for a static discriminant
subtype with range checking suppressed and the discriminant governs a
variant_part
which lacks a when others choice. But execution is erroneous if
a range check that would have failed is suppressed (see 11.5),
so an implementation does not have to generate code to check this case.
(An unchecked failed predicate does not cause erroneous execution, so
the test is required in that case.)

{AI05-0299-1}
We have added the term Discrete Choice to the title since this is where
they are talked about. This is analogous to the name of the subclause
"Index Constraints and Discrete Ranges" in the subclause on
Array Types.

Incompatibilities With Ada 2005

{AI05-0158-1}
Membership tests are no longer allowed as a discrete_choice,
in order that those tests can be expanded to allow multiple tests in
a single expression without ambiguity. Since a membership test has a
boolean type, they are very unlikely to be used as a discrete_choice.

Extensions to Ada 2005

{AI05-0188-1}
Variants in generic specifications are no longer rejected if the subtype
of the actual type does not include all of the case choices. This probably
isn't useful, but it is consistent with the treatment of case_expressions.

Wording Changes from Ada 2005

{AI05-0290-1}
Added a test that some variant
covers the value of a discriminant that governs a variant_part.
This is similar to the test that some case limb covers the value of the
Selecting_expression
of a case_statement.
This test cannot change the behavior of any nonerroneous Ada 2005 program,
so it is not an inconsistency.