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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6be630961a327bf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-09-09 21:48:31 PST Path: supernews.google.com!sn-xit-02!sn-east!supernews.com!news-feed.riddles.org.uk!nntp.cs.ubc.ca!newsflash.concordia.ca!canopus.cc.umanitoba.ca!news-in.mts.net!news1.mts.net.POSTED!not-for-mail From: "Nick J Chackowsky" Newsgroups: comp.lang.ada References: <6oBu5.666$zo.17816@news1.mts.net> Subject: Re: C++ to Ada95 -- bitten! X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Sat, 9 Sep 2000 23:49:23 -0500 NNTP-Posting-Host: 205.200.235.9 X-Complaints-To: admin@mts.net X-Trace: news1.mts.net 968561309 205.200.235.9 (Sat, 09 Sep 2000 23:48:29 CDT) NNTP-Posting-Date: Sat, 09 Sep 2000 23:48:29 CDT Organization: MTS Internet Xref: supernews.google.com comp.lang.ada:568 Date: 2000-09-09T23:49:23-05:00 List-Id: 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)" wrote in message news:uVCu5.3552$Ek.7557@newsfeed.slurp.net... > In article <6oBu5.666$zo.17816@news1.mts.net>, > Nick J Chackowsky 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 > --------------------------------+------------------------------------