summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch2.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch2.adb')
-rw-r--r--gcc/ada/sem_ch2.adb17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch2.adb b/gcc/ada/sem_ch2.adb
index f8e85b3c02a..23d4a191430 100644
--- a/gcc/ada/sem_ch2.adb
+++ b/gcc/ada/sem_ch2.adb
@@ -6,9 +6,9 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.8 $ --
+-- $Revision$
-- --
--- Copyright (C) 1992-1999, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -27,6 +27,7 @@
------------------------------------------------------------------------------
with Atree; use Atree;
+with Errout; use Errout;
with Opt; use Opt;
with Restrict; use Restrict;
with Sem_Ch8; use Sem_Ch8;
@@ -64,7 +65,17 @@ package body Sem_Ch2 is
procedure Analyze_Identifier (N : Node_Id) is
begin
- Find_Direct_Name (N);
+ -- Ignore call if prior errors, and identifier has no name, since
+ -- this is the result of some kind of previous error generating a
+ -- junk identifier.
+
+ if Chars (N) in Error_Name_Or_No_Name
+ and then Total_Errors_Detected /= 0
+ then
+ return;
+ else
+ Find_Direct_Name (N);
+ end if;
end Analyze_Identifier;
-----------------------------