[COMMITTED,06/31] ada: Fix comments

Message ID 20250911091904.1505690-6-poulhies@adacore.com
State Committed
Commit 6b74844753f6bf28af180f1b19a4a6a11be7464c
Headers
Series [COMMITTED,01/31] ada: Disable new warning for composite equality ops that can raise Program_Error |

Commit Message

Marc Poulhiès Sept. 11, 2025, 9:18 a.m. UTC
  From: Ronan Desplanques <desplanques@adacore.com>

This patch fixes a reference to an Ada RM clause, fixes an occurrence of
"unconstrained" that should have been "indefinite", and removes an
incorrect claim that completing a partial view without discriminants
with a full view with defaulted discriminants is an error situation.

gcc/ada/ChangeLog:

	* sem_ch3.adb (Process_Discriminants, Process_Full_View): Fix
	comments.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_ch3.adb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index b91c6785b035..b31587b4bcb1 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -21578,7 +21578,7 @@  package body Sem_Ch3 is
       Set_Stored_Constraint (Current_Scope, No_Elist);
 
       --  Default expressions must be provided either for all or for none
-      --  of the discriminants of a discriminant part. (RM 3.7.1)
+      --  of the discriminants of a discriminant part (RM 3.7 (9.1/3)).
 
       if Default_Present and then Default_Not_Present then
          Error_Msg_N
@@ -21969,8 +21969,7 @@  package body Sem_Ch3 is
 
       else
          --  For untagged types, verify that a type without discriminants is
-         --  not completed with an unconstrained type. A separate error message
-         --  is produced if the full type has defaulted discriminants.
+         --  not completed with an indefinite type.
 
          if Is_Definite_Subtype (Priv_T)
            and then not Is_Definite_Subtype (Full_T)