[gcc r16-5469] ada: Update the message for -gnatwx switch
Marc Poulhies
dkm@gcc.gnu.org
Fri Nov 21 08:31:06 GMT 2025
https://gcc.gnu.org/g:3cd98d416526624d176e421b0cca05b51d6ee1d9
commit r16-5469-g3cd98d416526624d176e421b0cca05b51d6ee1d9
Author: Viljar Indus <indus@adacore.com>
Date: Thu Jun 5 15:06:26 2025 +0300
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:
---
gcc/ada/freeze.adb | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index fe6f11ff353c..439462569bd4 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;
More information about the Gcc-cvs
mailing list