From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c5052684d3523ff1,start X-Google-Attributes: gid103376,public From: swhalen@netcom.com (Steve Whalen) Subject: GNAT 3.07 MsDos/DJGPP bug report to whom? Date: 1997/10/22 Message-ID: #1/1 X-Deja-AN: 282336966 Sender: swhalen@netcom15.netcom.com Organization: ? Newsgroups: comp.lang.ada Date: 1997-10-22T00:00:00+00:00 List-Id: I've found a bug in the Ada95 GNAT 3.07 MsDos / DJGPP implementation. The bug and it's cause are tacked on to the end of this message. Short summary: You can't compile *any* program that calls Ada.Calendar.Clock with -gnata AND -gnatn enabled. I know ACT no longer supports MsDos versions of GNAT. I know GNAT 3.07 is an old version with many bugs squashed in versions since then. I use GNAT 3.07 only because that's the latest one available for MsDos. I use GNAT 3.10 on OS/2 and Linux and other platforms. I'm trying to figure out who to report this bug to because it's kind of a pain (it's not unusual for me to use the clock, and I almost always enable assertions while developing / debugging). Because of the bug's location in the system primitives, I suspect it might survive an attempt at an upgrade to an MsDos version of GNAT 3.10 unless the "porter" were aware of it (assuming that someone even attempts to port GNAT 3.10 to MsDos) Does anyone have any suggestions as to who I should report it to? ACT's officially out of the MsDos business. I haven't heard if Mike/GW are planning on porting GNAT 3.10 to MsDos. I don't think the DJGPP people care (my compliments to the DJGPP people, I'm impressed with how much they've been able to make sloppy old MsDos do!). I understand that ACT's paying customers probably don't have MsDos as a high priority target, but GNAT for MsDos is sure handy to have around. I hope GW or someone continues to package an MsDos version of GNAT for new releases. I'd like to make a point I haven't seen elsewhere in the debate over the value of an MsDos version of GNAT. While I agree that Win32 and UNIX and other platforms are the commercially viable targets of choice, I believe MsDos has much value as a lowest common denominator *executable* format, especially for portability. I have a number of utilities that I need to be able to run on different platforms. With GNAT for MsDos available, it's easy: Once I've completed my development using OS/2 or Linux or whatever, all I have to do is substitute one small operating system dependency package and run "make" on each platform. It works great even for MsDos with GNAT 3.07 except for the occasional bug I run into (like this one). Bottom line: when I run into such a bug it means I can't have a copy of that utility that will run in MsDos. If I *have* an MsDos version of a program, I can execute it on most any platform (Linux using DosEmu, OS/2 and Windows 95 in their MsDos box, etc.), so I try to take MsDos versions everywhere with me. I got tired of being at a customer's site and finding out I had diskettes with every executable format EXCEPT the one I needed to run on the borrowed system... Now I try to keep an MsDos version handy even though I don't use it much on my own machine. I really want Ada95 / GNAT to be the language I use for my primary utilities whenever possible. Lack of ability to produce an MsDos executable from GNAT will make that more and more difficult over time... ... HERE's the BUG in GNAT 3.07 for MsDos / DJGPP ... D:\GNAT\GNAT307S\EXAMPLES>gnatmake diners -gnata -gnatn gcc -c -gnata -gnatn diners.adb gcc -c -gnata -gnatn room.adb s-timope.adb:64:29: operator for type "Interfaces.C.int" is not directly visible s-timope.adb:64:29: use clause would make operation legal s-timope.adb:65:09: incompatible types in short-circuit expression d:/gnat/bin/gnatmake.exe: "room.adb" compilation error ... caused by: s-timope.adb from GNAT 3.07 for MsDos in ez2load files ... snip ... -- This is a DOS (FSU THREAD) version of this package. with System.Error_Reporting; -- used for Shutdown with System.OS_Interface; with Interfaces.C; package body System.Time_Operations is use System.Error_Reporting; use System.OS_Interface; -- use Interfaces.C; <--- makes the "=" operator in pragma Assert below invisible when -gnata AND -gnatn enabled... ----------- -- Clock -- ----------- function Clock return Duration is TS : aliased timespec; Result : Interfaces.C.int; begin Result := clock_gettime (CLOCK_REALTIME, TS'Unchecked_Access); pragma Assert (Result = 0 or else Shutdown ("GNULLI failure---clock_gettime")); return To_Duration (TS); exception when others => pragma Assert (Shutdown ("exception in Clock")); return 0.0; end Clock; ... snip ... -- {===----------------------------------------------------------------------===} Steve Whalen swhalen@netcom.com {===----------------------------------------------------------------------===}