summaryrefslogtreecommitdiff
path: root/gcc/ada/atree.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-08 16:15:06 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-08 16:15:06 +0000
commit37d8f03021b8db774195e4e576067f249bbd651d (patch)
tree4fa6043235cf58bee6726c72dce924b1b6e8327f /gcc/ada/atree.adb
parent33c2b4c3848e3d337e01842de1b584a277c9787f (diff)
downloadgcc-37d8f03021b8db774195e4e576067f249bbd651d.tar.gz
* atree.adb: Set Error_Posted in Error node, helps error recovery.
* par-endh.adb (Output_End_Expected): We should also not test Error_Posted on the Error node, since now it is always set. * cstand.adb (Create_Standard): Set Etype of Error to Any_Type to help error recovery. Part of general work on 9407-004. * par.adb: Add ??? for misuse of error * sem_res.adb: (Resolve): Defend against Error, fixes 9407-003. (Resolve_Discrete_Subtype_Indication): Defend against Error. * sinfo.ads (N_Error): Now has Etype field (which will be set to Any_Type to help error recovery). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46077 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/atree.adb')
-rw-r--r--gcc/ada/atree.adb10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index d7b1af1aec8..7bfff100a56 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.205 $
+-- $Revision$
-- --
-- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
-- --
@@ -842,13 +842,17 @@ package body Atree is
Dummy : Node_Id;
begin
- -- Allocate Empty and Error nodes
+ -- Allocate Empty node
Dummy := New_Node (N_Empty, No_Location);
Set_Name1 (Empty, No_Name);
+
+ -- Allocate Error node, and set Error_Posted, since we certainly
+ -- only generate an Error node if we do post some kind of error!
+
Dummy := New_Node (N_Error, No_Location);
Set_Name1 (Error, Error_Name);
-
+ Set_Error_Posted (Error, True);
end Initialize;
--------------------------