2018-05-29 Arnaud Charlet <charlet@adacore.com>
gcc/ada/
* libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
function.
From-SVN: r260878
+2018-05-29 Arnaud Charlet <charlet@adacore.com>
+
+ * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
+ function.
+
2018-05-29 Olivier Hainque <hainque@adacore.com>
* libgnat/system-vxworks7-ppc-rtp.ads: New file.
return D;
end Day;
+ ------------------
+ -- Epoch_Offset --
+ ------------------
+
+ function Epoch_Offset return Time_Rep is
+ begin
+ return (136 * 365 + 44 * 366) * Nanos_In_Day;
+ end Epoch_Offset;
+
-------------
-- Is_Leap --
-------------
-- with overloading ambiguities in the body if we tried to use Time as an
-- internal computational type.
- Epoch_Offset : constant Time_Rep := (136 * 365 + 44 * 366) * Nanos_In_Day;
- -- The difference between 2150-1-1 UTC and 1970-1-1 UTC expressed in
+ function Epoch_Offset return Time_Rep;
+ pragma Inline (Epoch_Offset);
+ -- Return the difference between 2150-1-1 UTC and 1970-1-1 UTC expressed in
-- nanoseconds. Note that year 2100 is non-leap.
Days_In_Month : constant array (Month_Number) of Day_Number :=