From: Piotr Trojanek <troja...@adacore.com> 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. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.0