From: Piotr Trojanek Date: Tue, 10 Jun 2025 22:20:13 +0000 (+0200) Subject: ada: Adjust message about statically compatible result subtype X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5bacaa3dd8b66ac13517b9fa3c3a253d4001c5e;p=thirdparty%2Fgcc.git ada: Adjust message about statically compatible result subtype Ada RM 6.5(5.3/5) is about "result SUBTYPE of the function", while the error message was saying "result TYPE of the function". Now use the exact RM wording in the error message for this rule. gcc/ada/ChangeLog: * sem_ch3.adb (Check_Return_Subtype_Indication): Adjust error message to match the RM wording. --- diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 0afc65da52c..98a8fa56391 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -4297,7 +4297,7 @@ package body Sem_Ch3 is then Error_Msg_N ("result subtype must be statically compatible with the " & - "function result type", Indic); + "function result subtype", Indic); if not Predicates_Compatible (Obj_Typ, R_Typ) then Error_Msg_NE