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.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5095dad989e89e23 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-13 05:56:57 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!nntp.flash.net!news.flash.net!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <9074fi$93b$1@nnrp1.deja.com> <3A3253B1.AD8F32CF@ebox.tninet.se> <90u1vi$uah$1@nnrp1.deja.com> <90ukfm$c4p$1@nnrp1.deja.com> <3A36511D.973D82BD@nowhere.com> <916gsr$e6e$1@nnrp1.deja.com> Subject: Re: Does a null pointer always raise Constraint_Error? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Wed, 13 Dec 2000 13:56:56 GMT NNTP-Posting-Host: 216.215.81.85 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 976715816 216.215.81.85 (Wed, 13 Dec 2000 07:56:56 CST) NNTP-Posting-Date: Wed, 13 Dec 2000 07:56:56 CST Organization: FlashNet Communications, http://www.flash.net Xref: supernews.google.com comp.lang.ada:3056 Date: 2000-12-13T13:56:56+00:00 List-Id: "Lutz Donnerhacke" wrote in message news:slrn93eect.i1.lutz@taranis.iks-jena.de... : * Robert Dewar wrote: : [access to empty arrays represent as Null (System.Address)] : > subtype n is string (1 .. 0); : > type np is access n; : > a, b : np; : > : > if a.all = b.all then ... : > : >it is a common compiler bug to translate this as : > : > for j in n'range loop : > if a.all (j) = b.all (j) .... : > : >and the null loop causes no checks to be made :-) : : I do not see the bug. Probably explains why it's so common... (I'm guessing it might have something to do with the case where a or b are null. Presumably, no exception would be raised if the compiler generated this kind of code, due to n'range causing the body of the loop to be skipped altogether?)