From: Viljar Indus Date: Thu, 5 Jun 2025 12:06:26 +0000 (+0300) Subject: ada: Update the message for -gnatwx switch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cd98d416526624d176e421b0cca05b51d6ee1d9;p=thirdparty%2Fgcc.git ada: Update the message for -gnatwx switch Some messages triggered by this switch did not have the gnatwx tag and were not treated as a continuation of the same error message. gcc/ada/ChangeLog: * freeze.adb (Freeze_Profile): Improve -gnatwx message. --- diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index fe6f11ff353..439462569bd 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -4872,16 +4872,19 @@ package body Freeze is if Nkind (Original_Node (Parent (E))) = N_Full_Type_Declaration then Warn_Node := Parent (E); - - if Formal = First_Formal (E) then - Error_Msg_NE ("??in inherited operation&", Warn_Node, E); - end if; else Warn_Node := Formal; end if; Error_Msg_NE ("?x?type of argument& is unconstrained array", Warn_Node, Formal); + + if Nkind (Original_Node (Parent (E))) = N_Full_Type_Declaration + and then Formal = First_Formal (E) + then + Error_Msg_NE ("\?x?in inherited operation&", Warn_Node, E); + end if; + Error_Msg_N ("\?x?foreign caller must pass bounds explicitly", Warn_Node); Error_Msg_Qual_Level := 0;