sem_type.adb (Add_One_Interp): an operator for a type declared in an extension of...
authorEd Schonberg <schonber@gnat.com>
Fri, 12 Oct 2001 00:35:43 +0000 (00:35 +0000)
committerGeert Bosch <bosch@gcc.gnu.org>
Fri, 12 Oct 2001 00:35:43 +0000 (02:35 +0200)
* sem_type.adb (Add_One_Interp): an operator for a type declared in
an extension of System is known to be visible.

From-SVN: r46217

gcc/ada/ChangeLog
gcc/ada/sem_type.adb

index 2ab878c5743e86def16ca9dbcadbd32c66cd0371..bf4395902e6a1eb6229294ebfde636a2c88263e2 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-11  Ed Schonberg <schonber@gnat.com>
+
+       * sem_type.adb (Add_One_Interp): an operator for a type declared in 
+       an extension of System is known to be visible.
+
 2001-10-11  Ed Schonberg <schonber@gnat.com>
 
        * sem_eval.adb (Compare_Fixup): get the bounds of a String_Literal 
index 9c335e6c4c6460bedc0a6d899a7ac2fe382fccca..afb347d4c71c133f6761161cb33058ef07b61699 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                            $Revision: 1.198 $
+--                            $Revision$
 --                                                                          --
 --          Copyright (C) 1992-2001 Free Software Foundation, Inc.          --
 --                                                                          --
@@ -286,12 +286,15 @@ package body Sem_Type is
 
          --  If the node is given in functional notation and the prefix
          --  is an expanded name, then the operator is visible if the
-         --  prefix is the scope of the result type as well.
+         --  prefix is the scope of the result type as well. If the
+         --  operator is (implicitly) defined in an extension of system,
+         --  it is know to be valid (see Defined_In_Scope, sem_ch4.adb).
 
          elsif Nkind (N) = N_Function_Call
            and then Nkind (Name (N)) = N_Expanded_Name
            and then (Entity (Prefix (Name (N))) = Scope (Base_Type (T))
-                      or else Entity (Prefix (Name (N))) = Scope (Vis_Type))
+                      or else Entity (Prefix (Name (N))) = Scope (Vis_Type)
+                      or else Scope (Vis_Type) = System_Aux_Id)
          then
             null;