public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Initialize Current_Error_Node
@ 2021-07-06 14:48 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-06 14:48 UTC (permalink / raw)
  To: gcc-patches; +Cc: Bob Duff

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

... because in case of compiler bugs, it can be accessed early, so it
needs to be initialized.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* atree.ads (Current_Error_Node): Initialize to Empty.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 383 bytes --]

diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -130,7 +130,7 @@ package Atree is
    --  Current_Error_Node is also used for other purposes. See, for example,
    --  Rtsfind.
 
-   Current_Error_Node : Node_Id;
+   Current_Error_Node : Node_Id := Empty;
    --  Node to place compiler abort messages
 
    ------------------



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-06 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 14:48 [Ada] Initialize Current_Error_Node 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).