public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-663] [Ada] Do not set Current_Error_Node to a node without location
@ 2022-05-19 14:08 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-19 14:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b64c4968c7f3eb4c5ac0c56e6f11b10419dacd0c
commit r13-663-gb64c4968c7f3eb4c5ac0c56e6f11b10419dacd0c
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Sat Feb 19 12:20:50 2022 +0100
[Ada] Do not set Current_Error_Node to a node without location
The message "No source file position information available" is displayed
in the bugbox when Current_Error_Node has no location, which is useless.
gcc/ada/
* gcc-interface/trans.cc (gnat_to_gnu): Do not set Current_Error_Node
to a node without location.
Diff:
---
gcc/ada/gcc-interface/trans.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index b8a0d5d5d30..4577d9f110b 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -6139,7 +6139,8 @@ gnat_to_gnu (Node_Id gnat_node)
bool aa_sync;
/* Save node number for error message and set location information. */
- Current_Error_Node = gnat_node;
+ if (Sloc (gnat_node) > No_Location)
+ Current_Error_Node = gnat_node;
Sloc_to_locus (Sloc (gnat_node), &input_location);
/* If we are only annotating types and this node is a statement, return
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-19 14:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 14:08 [gcc r13-663] [Ada] Do not set Current_Error_Node to a node without location Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).