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 Path: g2news2.google.com!postnews.google.com!r19g2000prm.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: What is the warning about builtin-function on gcc-4.6.0 ? Date: Tue, 29 Mar 2011 18:02:40 -0700 (PDT) Organization: http://groups.google.com Message-ID: 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> <87vcz5ot5z.fsf@mid.deneb.enyo.de> <87sju8lcis.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1301446960 15559 127.0.0.1 (30 Mar 2011 01:02:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 30 Mar 2011 01:02:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r19g2000prm.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19566 Date: 2011-03-29T18:02:40-07:00 List-Id: On Mar 29, 11:35=A0am, Robert A Duff wrote: > > And if it didn't do that, the implementor could change the function to > > include 'Valid on the operands to ensure that they're not invalid. > > Sure, EQUAL can raise C_E on invalid values. > But I don't think it can return True for invalid values > that are not mathematically equal. =A0(If it can, I think it's > a mistake in the REPORT package.) =A0I'm too lazy to inspect it > right now. The version of Report's body I'm looking at is from 3/29/01, but the comments don't indicate any changes to EQUAL since the first version. EQUAL can't propagate C_E because it has an exception handler for it: it just reverts to "return X =3D Y" if any exception is raised. If the compiler's behavior is incorrect and doesn't raise C_E for abs(Integer'First) when it's supposed to, then presumably abs(Integer'First) will still be Integer'First (on a normal 2's complement machine), and EQUAL will return TRUE. [If the compiler did something interesting like reserving a bit pattern like 16#8000# or 16#80000000# to be an invalid integer, then Integer'Last would be - Integer'First and the interesting part of C45632A would never be executed due to the first IF.] -- Adam