diff options
author | Steve Baird <baird@adacore.com> | 2022-08-09 09:51:41 -0700 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-06 09:14:21 +0200 |
commit | aed54a141a74b1752a5ba052f2ef151940867201 (patch) | |
tree | 19b4c45434202b77cd75f3f54f27ea161f1918c0 | |
parent | 1dbaf0d99c37024dcfafa73366c32a206e8f21a2 (diff) | |
download | gcc-aed54a141a74b1752a5ba052f2ef151940867201.zip gcc-aed54a141a74b1752a5ba052f2ef151940867201.tar.gz gcc-aed54a141a74b1752a5ba052f2ef151940867201.tar.bz2 |
[Ada] Document change to legality checks for Inox case statements
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.
-rw-r--r-- | gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst | 3 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index 4318a34..623949e 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -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 diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index e63c757..d143875 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -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 |