This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Ada, bug in Gnat Calendar.Time_Of ?
- From: Nicolas BRUNOT <n dot brunot at cadwin dot com>
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Wed, 4 Dec 2002 12:10:13 +0100
- Subject: Ada, bug in Gnat Calendar.Time_Of ?
the following code raise Constraint_Error at runtime with the following
output
-----------------
Test calendar.time_of ...
raised CONSTRAINT_ERROR : a-calend.adb:419 explicit raise
-----------------
tested with current gcc 3.3 build for linux (REDHAT 7.2), and also for
Windows (mingw32)
Should I submit a bug report in GNATS ?
compile command is "gnatmake bug_calendar_time_of"
source file bug_calendar_time_of.adb contains
with Calendar;
with Ada.Text_Io;
procedure Bug_Calendar_Time_Of is
Now : constant Calendar.Time := Calendar.Clock;
Year_Number : Calendar.Year_Number;
Month_Number : Calendar.Month_Number;
Day_Number : Calendar.Day_Number;
Seconds : Calendar.Day_Duration;
Result : Calendar.Time;
begin
Ada.Text_Io.Put ("Test calendar.time_of ...");
Calendar.Split (Now, Year_Number, Month_Number, Day_Number, Seconds);
Result := Calendar.Time_Of (Year_Number, Month_Number, Day_Number);
Ada.Text_Io.Put_Line (" OK");
end;