]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix comments
authorRonan Desplanques <desplanques@adacore.com>
Wed, 13 Aug 2025 09:13:07 +0000 (11:13 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 11 Sep 2025 09:10:46 +0000 (11:10 +0200)
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.

gcc/ada/sem_ch3.adb

index b91c6785b035af259684f854639c89aa8546bcac..b31587b4bcb1f9352069082cb4c6edf79a6e7c11 100644 (file)
@@ -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)