diff options
| author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 01:29:47 +0000 |
|---|---|---|
| committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 01:29:47 +0000 |
| commit | 9c4be4ce11328661557486dcb357488f859e4e53 (patch) | |
| tree | 7c49dc73bf9196e70d52f54eee566867d69c4be2 | |
| parent | 3aacc79fbee7c9925c958669a69e9e916253cc3f (diff) | |
| download | ppe42-gcc-9c4be4ce11328661557486dcb357488f859e4e53.tar.gz ppe42-gcc-9c4be4ce11328661557486dcb357488f859e4e53.zip | |
* sem_util.adb (Enter_Name): better handling of cascaded error
messages when a unit appears in its own context.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46516 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/ada/sem_util.adb | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ecb970a0e8b..2a96c895dd6 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2001-10-25 Ed Schonberg <schonber@gnat.com> + * sem_util.adb (Enter_Name): better handling of cascaded error + messages when a unit appears in its own context. + +2001-10-25 Ed Schonberg <schonber@gnat.com> + * sem_util.adb (Defining_Entity): in case of error, attach created entity to specification, so that semantic analysis can proceed. diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 7bc2b9230c0..e53f8718de2 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -1602,6 +1602,18 @@ package body Sem_Util is Error_Msg_N ("& conflicts with declaration#", E); return; + -- If the name of the unit appears in its own context clause, + -- a dummy package with the name has already been created, and + -- the error emitted. Try to continue quietly. + + elsif Error_Posted (E) + and then Sloc (E) = No_Location + and then Nkind (Parent (E)) = N_Package_Specification + and then Current_Scope = Standard_Standard + then + Set_Scope (Def_Id, Current_Scope); + return; + else Error_Msg_N ("& conflicts with declaration#", Def_Id); |

