From: Denis Mazzucato <[email protected]>
AI12-0095-1 added a paragraph after RM 6.4.1(6.3/3), all the subsequent RM
references within 6.x may be off by one; this patch updates those references.
gcc/ada/ChangeLog:
* sem_util.adb: Fix RM references.
* sem_util.ads: Likewise.
* sem_warn.adb: Likewise.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_util.adb | 8 ++++----
gcc/ada/sem_util.ads | 2 +-
gcc/ada/sem_warn.adb | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 87a4dbb919f..65fa66745a2 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -2801,7 +2801,7 @@ package body Sem_Util is
if Is_Writable_Actual then
-- Skip checking the error in non-elementary types since
- -- RM 6.4.1(6.15/3) is restricted to elementary types, but
+ -- RM 6.4.1(6.16/3) is restricted to elementary types, but
-- store this actual in Writable_Actuals_List since it is
-- needed to perform checks on other constructs that have
-- arbitrary order of evaluation (for example, aggregates).
@@ -2959,7 +2959,7 @@ package body Sem_Util is
-- call C2 (not including the construct C itself), there is no other
-- name anywhere within a direct constituent of the construct C other
-- than the one containing C2, that is known to refer to the same
- -- object (RM 6.4.1(6.17/3)).
+ -- object (RM 6.4.1(6.18/3)).
case Nkind (N) is
when N_Range =>
@@ -3206,7 +3206,7 @@ package body Sem_Util is
-- For an array aggregate, a discrete_choice_list that has
-- a nonstatic range is considered as two or more separate
- -- occurrences of the expression (RM 6.4.1(6.20/3)).
+ -- occurrences of the expression (RM 6.4.1(6.21/3)).
elsif Is_Array_Type (Etype (N))
and then Nkind (N) = N_Aggregate
@@ -7052,7 +7052,7 @@ package body Sem_Util is
-- For renamings, return False if the prefix of any dereference within
-- the renamed object_name is a variable, or any expression within the
-- renamed object_name contains references to variables or calls on
- -- nonstatic functions; otherwise return True (RM 6.4.1(6.10/3))
+ -- nonstatic functions; otherwise return True (RM 6.4.1(6.11/3))
------------------------
-- Is_Object_Renaming --
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 8e62fcc6f4b..6118e27bc2d 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -711,7 +711,7 @@ package Sem_Util is
function Denotes_Same_Object (A1, A2 : Node_Id) return Boolean;
-- Detect suspicious overlapping between actuals in a call, when both are
- -- writable (RM 2012 6.4.1(6.4/3)).
+ -- writable (RM 2012 6.4.1(6.5/3)).
function Denotes_Same_Prefix (A1, A2 : Node_Id) return Boolean;
-- Functions to detect suspicious overlapping between actuals in a call,
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index e14780a4e37..962a2230cc8 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -3921,7 +3921,7 @@ package body Sem_Warn is
-- known to refer to the same object as the other name; or one of the
-- two names statically denotes a renaming declaration whose renamed
-- object_name is known to refer to the same object as the other name
- -- (RM 6.4.1(6.11/3))
+ -- (RM 6.4.1(6.12/3))
-----------------------------
-- Explicitly_By_Reference --
@@ -3980,7 +3980,7 @@ package body Sem_Warn is
-- of an elementary type, then the call is legal only if for each name
-- N that is passed as a parameter of mode in out or out to the call C,
-- there is no other name among the other parameters of mode in out or
- -- out to C that is known to denote the same object (RM 6.4.1(6.15/3))
+ -- out to C that is known to denote the same object (RM 6.4.1(6.16/3))
-- This has been clarified in AI12-0216 to indicate that the illegality
-- only occurs if both formals are of an elementary type, because of the
-- nondeterminism on the write-back of the corresponding actuals.
--
2.53.0