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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: What is the warning about builtin-function on gcc-4.6.0 ? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH 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> Date: Sat, 26 Mar 2011 16:14:26 +0100 Message-ID: <1n6308pk6569t.tyc9cc9l3fcn$.dlg@40tude.net> NNTP-Posting-Date: 26 Mar 2011 16:14:25 CET NNTP-Posting-Host: 9171eda3.newsspool2.arcor-online.net X-Trace: DXC=nG=_c56lfnNFJ3]dH>I?oEA9EHlD;3YcB4Fo<]lROoRA8kF?h]n_D X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:19439 Date: 2011-03-26T16:14:25+01:00 List-Id: On Sat, 26 Mar 2011 11:24:37 +0100, Florian Weimer wrote: > * ytomino: > >> nn...then, there are no function to take infinity and NaN... > > There has to be something in the language, somewhere, but I can't find > it. A.5.3 in Ada 2005 would be an obvious location (attributes on > floating point types), but it's not there. Ada floating point types are not necessarily IEEE. Luckily you can kill the IEEE stuff even if the machine is IEEE: subtype No_Mess is Float range Float'Range; -- No surprises any more 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 follows this rule. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de