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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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 Path: g2news2.google.com!postnews.google.com!l2g2000prg.googlegroups.com!not-for-mail From: ytomino Newsgroups: comp.lang.ada Subject: Re: What is the warning about builtin-function on gcc-4.6.0 ? Date: Sat, 26 Mar 2011 14:36:04 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5e721fd6-ee2c-4754-b09a-4a3b9c601bf3@l2g2000prg.googlegroups.com> 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> <87tyeqi3h6.fsf@mid.deneb.enyo.de> <1n6308pk6569t.tyc9cc9l3fcn$.dlg@40tude.net> NNTP-Posting-Host: 114.164.26.2 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1301175364 22577 127.0.0.1 (26 Mar 2011 21:36:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 26 Mar 2011 21:36:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l2g2000prg.googlegroups.com; posting-host=114.164.26.2; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19453 Date: 2011-03-26T14:36:04-07:00 List-Id: On Mar 27, 12:14=A0am, "Dmitry A. Kazakov" wrote: > Ada floating point types are not necessarily IEEE. I knew and so used builtin-functions. > Luckily you can kill the IEEE stuff even if the machine is IEEE: > > =A0 =A0subtype No_Mess is Float range Float'Range; -- No surprises any mo= re > > When interfacing C, one IMO should always add a range or validity check > when taking floating-point values from C, to prevent non-numbers leaking > out. Unfortunately it is a lot of work, so no Ada bindings actually follo= ws > this rule. uh, there are functions (from C) that return infinity/NaN intentionally, too.