This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Fix a problem with operator visibility
- To: gcc-patches at gcc dot gnu dot org
- Subject: [Ada] Fix a problem with operator visibility
- From: Geert Bosch <bosch at gnat dot com>
- Date: Thu, 11 Oct 2001 20:35:46 -0400 (EDT)
Fix a problem with operator visibility. For Ed.
-Geert
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.
*** sem_type.adb 2001/09/05 09:40:47 1.198
--- sem_type.adb 2001/09/26 12:13:41 1.199
***************
*** 286,297 ****
-- 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.
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))
then
null;
--- 286,300 ----
-- 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. 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 Scope (Vis_Type) = System_Aux_Id)
then
null;