The comment in the public section of the spec says the comparison ops
are intrinsic, but that doesn't match the private part implementation
and comment. Fix this.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * libgnat/s-os_lib.ads: Import OS_Time comparison ops as
        intrinsic.
        * libgnat/s-os_lib.adb: Remove OS_TIme comparison ops
        implementation.
diff --git a/gcc/ada/libgnat/s-os_lib.adb b/gcc/ada/libgnat/s-os_lib.adb
--- a/gcc/ada/libgnat/s-os_lib.adb
+++ b/gcc/ada/libgnat/s-os_lib.adb
@@ -133,42 +133,6 @@ package body System.OS_Lib is
    --  Converts a C String to an Ada String. We could do this making use of
    --  Interfaces.C.Strings but we prefer not to import that entire package
 
-   ---------
-   -- "<" --
-   ---------
-
-   function "<"  (X, Y : OS_Time) return Boolean is
-   begin
-      return Long_Long_Integer (X) < Long_Long_Integer (Y);
-   end "<";
-
-   ----------
-   -- "<=" --
-   ----------
-
-   function "<="  (X, Y : OS_Time) return Boolean is
-   begin
-      return Long_Long_Integer (X) <= Long_Long_Integer (Y);
-   end "<=";
-
-   ---------
-   -- ">" --
-   ---------
-
-   function ">"  (X, Y : OS_Time) return Boolean is
-   begin
-      return Long_Long_Integer (X) > Long_Long_Integer (Y);
-   end ">";
-
-   ----------
-   -- ">=" --
-   ----------
-
-   function ">="  (X, Y : OS_Time) return Boolean is
-   begin
-      return Long_Long_Integer (X) >= Long_Long_Integer (Y);
-   end ">=";
-
    -----------------
    -- Args_Length --
    -----------------


diff --git a/gcc/ada/libgnat/s-os_lib.ads b/gcc/ada/libgnat/s-os_lib.ads
--- a/gcc/ada/libgnat/s-os_lib.ads
+++ b/gcc/ada/libgnat/s-os_lib.ads
@@ -1111,18 +1111,13 @@ private
    --  time stamps, but may have a different representation than C's time_t.
    --  This type needs to match the declaration of OS_Time in adaint.h.
 
-   --  Add pragma Inline statements for comparison operations on OS_Time. It
-   --  would actually be nice to use pragma Import (Intrinsic) here, but this
-   --  was not properly supported till GNAT 3.15a, so that would cause
-   --  bootstrap path problems. To be changed later ???
-
    Invalid_Time : constant OS_Time := -1;
    --  This value should match the return value from __gnat_file_time_*
 
-   pragma Inline ("<");
-   pragma Inline (">");
-   pragma Inline ("<=");
-   pragma Inline (">=");
+   pragma Import (Intrinsic, "<");
+   pragma Import (Intrinsic, ">");
+   pragma Import (Intrinsic, "<=");
+   pragma Import (Intrinsic, ">=");
    pragma Inline (To_C);
    pragma Inline (To_Ada);
 


Reply via email to