comp.lang.ada
 help / color / mirror / Atom feed
* Conflict of names
@ 1998-03-05  0:00 Dmitriy Anisimkov
  0 siblings, 0 replies; only message in thread
From: Dmitriy Anisimkov @ 1998-03-05  0:00 UTC (permalink / 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;




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-03-05  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-05  0:00 Conflict of names Dmitriy Anisimkov

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