From: "Nick J Chackowsky" <nick@arcticmail.com>
Subject: Re: C++ to Ada95 -- bitten!
Date: Sat, 9 Sep 2000 23:49:23 -0500
Date: 2000-09-09T23:49:23-05:00 [thread overview]
Message-ID: <xoEu5.688$zo.18789@news1.mts.net> (raw)
In-Reply-To: uVCu5.3552$Ek.7557@newsfeed.slurp.net
Ahaaaa... the _compiler_ attempted to "solve" the poorly formed exponent and
crashed in the attempt?
I too would have expected a compile error rather than a compiler crash. I
will submit a bug report.
--
=====================================
N J Chackowsky
Brandon, MB Canada
"(null)" <cts@kampong.aedinc.net> wrote in message
news:uVCu5.3552$Ek.7557@newsfeed.slurp.net...
> In article <6oBu5.666$zo.17816@news1.mts.net>,
> Nick J Chackowsky <nick@arcticmail.com> wrote:
> >So just when I think I'm getting the idea of Ada95, along comes this
> >problem, demonstrated by an admittedly contrived program. Gnat 3.13p
crashes
> >trying to compile this:
> >
> > with ada.float_text_io;
> > with ada.numerics;
> > with ada.numerics.elementary_functions;
> > use ada.numerics.elementary_functions;
> > procedure crash is
> > f, g : float;
> > begin
> > ada.float_text_io.get(f);
> > g := 2.7183 ** (-5340)/f + 21.5;
> > end crash;
>
> The compiler shouldn't crash no matter what kind of input you feed it.
> You should send a bug report to ACT. The file gnatinfo.txt will explain
> where and how to send the bug report.
>
>
> [snip]
>
> >I guess my question is, what _category_ of error is this? I know to look
> >(now) for an integer in a floating-point calculation,
>
>
> No, raising 2.7183 to an integer power is fine, what probably killed[1]
the compiler was trying to figure out 2.7183 raised the to -5340 power.
>
>
> --
> =======================================================================
> Life is short. | Craig Spannring
> Bike hard, ski fast. | cts@internetcds.com
> --------------------------------+------------------------------------
next prev parent reply other threads:[~2000-09-10 4:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-10 1:24 C++ to Ada95 -- bitten! Nick J Chackowsky
2000-09-10 2:28 ` Al Christians
2000-09-10 3:07 ` (null)
2000-09-10 4:49 ` Nick J Chackowsky [this message]
2000-09-10 7:39 ` Laurent Guerby
2000-09-10 15:47 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox