This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]