comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitriy Anisimkov" <ts@quadrat.omsk.su>
Subject: Conflict of names
Date: 1998/03/05
Date: 1998-03-05T00:00:00+00:00	[thread overview]
Message-ID: <01bd47da$81564840$LocalHost@----> (raw)


with Text_Io;use Text_Io;
procedure Eq is 

   package Long_Equal is
      subtype LLI is Long_Long_Integer;
      function "="(Left,Right : LLi) return Boolean; 
      pragma Inline("=");
   end Long_Equal;   
   package body Long_Equal is
      function "="(Left,Right : Lli) return Boolean is 
      begin
         return Standard."="(Left,Right);
      end;
   end Long_Equal;   
   use Long_Equal;

   Lc : constant LLI :=  16#F_0000_0000#; 
   L : LLi := 0;
begin  
   L := Lc;
   if L=0 then 
-- Which call compiler must made Standard."=" or Long_Equal."="
-- or must generate error ?
-- The GNAT 3-10 for Win32 calls Standard."="
      Put_Line("------");
   end if;
end;


Compare with :

with Text_Io;use Text_Io;
procedure Eq is 

   subtype LLI is Long_Long_Integer;
   function "="(Left,Right : Lli) return Boolean is 
   begin
      Put_Line("--=--");
      return Standard."="(Left,Right);
   end;
   pragma Inline("=");

   Lc : constant LLI :=  16#F_0000_0000#; 
   L : LLi := 0;
begin  
   L := Lc;
   if L=0 then -- calls the function "="(Left,Right : Lli) return Boolean;
      Put_Line("------");
   end if;
end;




                 reply	other threads:[~1998-03-05  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox