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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ecc38b3271b36b88 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.erje.net!news.szaf.org!news.gnuher.de!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: What is the warning about builtin-function on gcc-4.6.0 ? Date: Sat, 26 Mar 2011 19:48:49 +0100 Message-ID: <87ipv5g1ke.fsf@mid.deneb.enyo.de> References: <87aagiclte.fsf@mid.deneb.enyo.de> <475d10ca-5d4e-490c-9b88-e12cd3cd3faa@b13g2000prf.googlegroups.com> <87d3lejjyv.fsf@mid.deneb.enyo.de> <6c748f70-7e75-49b4-a467-d1d2d6b24323@w9g2000prg.googlegroups.com> <87k4flhoeg.fsf@mid.deneb.enyo.de> <8762r5hl2u.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ruchba.enyo.de 1301165331 22094 172.17.135.6 (26 Mar 2011 18:48:51 GMT) X-Complaints-To: news@enyo.de Cancel-Lock: sha1:whbu9cPG9hGZC1bxZ43vQdcMwkE= Xref: g2news1.google.com comp.lang.ada:18475 Date: 2011-03-26T19:48:49+01:00 List-Id: * Simon Wright: >> My understanding is that an implementation must either raise >> Constraint_Error, or the evaluation of an expression must result in a >> valid value. > > ARM 13.9.2 doesn't include division by zero as a means of producing an > invalid float. Floating point arithmetic is not mentioned in in 13.9.1, either (which seems an exhaustive list to me). I'm concerned that any interpretation which makes 'Valid false here would also allow to produce arbitrary values from any form of arithmetic, floating point or not. (If 'Valid is false, the object is abnormal, so all bets are off.) > I don't see anything in the above that says that 'Valid should produce > False for Inf/NaN, but GNAT - on Intel & PowerPC hardware - certainly > does. And it's not an accident as the result of failing range checks or something like that. There is a deliberate check for Infs and Nans in s-fatgen.adb.