comp.lang.ada
 help / color / mirror / Atom feed
* GNAT 3.07 MsDos/DJGPP bug report to whom?
@ 1997-10-22  0:00 Steve Whalen
  1997-10-22  0:00 ` Thomas Koenig
  1997-10-22  0:00 ` Gautier
  0 siblings, 2 replies; 11+ messages in thread
From: Steve Whalen @ 1997-10-22  0:00 UTC (permalink / raw)



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
{===----------------------------------------------------------------------===}




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1997-10-25  0:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-22  0:00 GNAT 3.07 MsDos/DJGPP bug report to whom? Steve Whalen
1997-10-22  0:00 ` Thomas Koenig
1997-10-22  0:00   ` Robert Dewar
1997-10-22  0:00     ` Robert Dewar
     [not found]       ` <62n8j8$hj4@info4.rus.uni-stuttgart.de>
     [not found]         ` <dewar.877607416@merv>
1997-10-23  0:00           ` Larry Kilgallen
1997-10-23  0:00             ` Robert Dewar
1997-10-25  0:00               ` Jerry van Dijk
1997-10-25  0:00   ` Richard Kenner
1997-10-22  0:00 ` Gautier
1997-10-22  0:00   ` Peter Hermann
1997-10-22  0:00     ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox