Y2038 compliance broken on 32bit

Hi,

regarding Bug report

Wondering if there is any chance of this being fixed in 16.3?

Leads to another question. What is the future, for gnat on 32bit?

Regards,

Peter

I suppose 32bit era comes to past. Except embedded systems, but usually they are crosses hosted on 64bit

Having looked into this a bit further, it seems to me that time routines are generally OK,

but dates after Y-2038 are broken on 32 bit. (Y2038 is fine on 64bit)

--  Test y2038 compliance with
--  faketime -f '+20y' ./test

with Ada.Calendar, Ada.Text_IO;
procedure test is
   Y : Ada.Calendar.Year_Number;
   M : Ada.Calendar.Month_Number;
   D : Ada.Calendar.Day_Number;
   S : Duration;

begin
   Ada.Calendar.Split (Ada.Calendar.Clock, Y, M, D, S);
   Ada.Text_IO.Put_Line (Y'Img & M'Img & D'Img);
end test;

The most recent 32-bit GNAT I have is 14.2.0 on armhf gives wrong answer:

1910 8 3

Indeed. It’s not a recent regression.
I’ve tested 32bit gnat versions, 13, 14, 15, 16 and its broken on all of them.

This topic should be tagged ā€˜gnat’ rather than ā€˜releases’.

Is there any way to retag it?

Hi, the category is ā€˜release’ and there is no ā€˜gnat’ category. I can change it to ā€˜help’ if you want.

For now I have added the gnat tag but didn’t change the category (unless you want me to).

Thanks for adding the ā€˜gnat’ tag.
Yes, please remove ā€˜release’ category. As the bug exists in 13-16, and probably always existed,

it clearly has nothing to do with any recent release.

And, if possible , ā€œY2038 compliance broken on 32bitā€,

would be a better title.