summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViljar Indus <indus@adacore.com>2025-06-05 15:06:26 +0300
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-11-21 09:29:36 +0100
commit3cd98d416526624d176e421b0cca05b51d6ee1d9 (patch)
treee7a2126ab37829bbb51a6210d4910631f62ff262
parent566ca645e4ba676df1f5ae4bf4767b4ecf69bdf1 (diff)
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.
-rw-r--r--gcc/ada/freeze.adb11
1 files changed, 7 insertions, 4 deletions
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;