]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Document change to legality checks for Inox case statements
authorSteve Baird <baird@adacore.com>
Tue, 9 Aug 2022 16:51:41 +0000 (09:51 -0700)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 6 Sep 2022 07:14:21 +0000 (09:14 +0200)
INOX (which is enabled via -gnatX) supports composite case-statement selectors.
As a temporary measure, simplify the coverage-related compile-time checks
for such case statements via two changes: an others choice is always
required for such a case statement, and no legality checks relating to
overlapping of case choices are performed.

gcc/ada/

* doc/gnat_rm/implementation_defined_pragmas.rst: Document new
temporary rule that a "when others =>" case choice must be given
when casing on a composite selector.
* gnat_rm.texi: Regenerate.

gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
gcc/ada/gnat_rm.texi

index 4318a347028a4b9b2a099a6257732c8af06d009c..623949e907cc0bd3a96b42e5aa6ca69f558d51c8 100644 (file)
@@ -2262,7 +2262,8 @@ of GNAT specific extensions are recognized as follows:
   will not be executed if the earlier alternative "matches"). All possible
   values of the composite type shall be covered. The composite type of the
   selector shall be an array or record type that is neither limited
-  class-wide.
+  class-wide. Currently, a "when others =>" case choice is required; it is
+  intended that this requirement will be relaxed at some point.
 
   If a subcomponent's subtype does not meet certain restrictions, then
   the only value that can be specified for that subcomponent in a case
index e63c757ac0ff1f210af91e4aeb032bced7d8a043..d143875bc6de5a5abf6bce7442b285e71a405b6a 100644 (file)
@@ -3717,7 +3717,8 @@ set shall be a proper subset of the second (and the later alternative
 will not be executed if the earlier alternative “matches”). All possible
 values of the composite type shall be covered. The composite type of the
 selector shall be an array or record type that is neither limited
-class-wide.
+class-wide. Currently, a “when others =>” case choice is required; it is
+intended that this requirement will be relaxed at some point.
 
 If a subcomponent’s subtype does not meet certain restrictions, then
 the only value that can be specified for that subcomponent in a case