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.7 required=5.0 tests=BAYES_00,MSGID_RANDY 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-12 17:01:29 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!newspump.monmouth.com!newspeer.monmouth.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Does a null pointer always raise Constraint_Error? Date: Wed, 13 Dec 2000 00:46:20 GMT Organization: Deja.com Message-ID: <916gsr$e6e$1@nnrp1.deja.com> 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> NNTP-Posting-Host: 205.232.38.240 X-Article-Creation-Date: Wed Dec 13 00:46:20 2000 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) X-Http-Proxy: 1.0 x73.deja.com:80 (Squid/1.1.22) for client 205.232.38.240 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:3031 Date: 2000-12-13T00:46:20+00:00 List-Id: In article , Keith Thompson wrote: > Wayne Magor writes: > [...] > > I remember with one Ada compiler I wanted to make null to be a > > pointer to a zero-length segment so the null check would be > > unnecessary (the hardware would do it for you). No, that's not quite right, you can still miss things, consider 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 :-) Sent via Deja.com http://www.deja.com/