This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Ada] Fix ACATS BA1101E - compilation abandoned, and extra message


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.


*** sem_util.adb	2001/09/20 01:15:05	1.541
--- sem_util.adb	2001/09/29 21:15:58	1.542
***************
*** 1588,1593 ****
--- 1588,1605 ----
                 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);
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]