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,UPPERCASE_50_75 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: g2news1.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: What is the warning about builtin-function on gcc-4.6.0 ? Date: Sun, 27 Mar 2011 12:51:13 -0400 Organization: The World Public Access UNIX, Brookline, MA 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> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1301244674 31290 192.74.137.71 (27 Mar 2011 16:51:14 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 27 Mar 2011 16:51:14 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:F/YHQEAwcJag2anoufnNdiiDYaA= Xref: g2news1.google.com comp.lang.ada:18500 Date: 2011-03-27T12:51:13-04:00 List-Id: Florian Weimer writes: > This is at odds with the existing Ada literature, and existing ACATS > tests (C45632A, for example). Hmm, I got curious, and looked at C45632A. It looks wrong, to me. "EQUAL (ABS I, I)" should return False, or else raise C_E. The test requires it to return True, or raise C_E. Maybe they meant "EQUAL (ABS I, - I)". Or am I misreading this test? WITH REPORT; USE REPORT; PROCEDURE C45632A IS I : INTEGER := IDENT_INT (INTEGER'FIRST); BEGIN TEST ( "C45632A", "CHECK THAT FOR PREDEFINED TYPE INTEGER " & "CONSTRAINT_ERROR IS RAISED " & "FOR ABS (INTEGER'FIRST) IF -INTEGER'LAST > " & "INTEGER'FIRST" ); BEGIN IF - INTEGER'LAST > INTEGER'FIRST THEN BEGIN IF EQUAL (ABS I, I) THEN NULL; ELSE FAILED ( "WRONG RESULT FOR ABS" ); END IF; FAILED ( "EXCEPTION NOT RAISED" ); EXCEPTION WHEN CONSTRAINT_ERROR => COMMENT ( "CONSTRAINT_ERROR RAISED" ); WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED" ); END; ELSE COMMENT ( "-INTEGER'LAST <= INTEGER'FIRST" ); END IF; END; RESULT; END C45632A;