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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5095dad989e89e23 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-12 09:08:02 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.stanford.edu!headwall.stanford.edu!unlnews.unl.edu!newsfeed.ksu.edu!nntp.ksu.edu!onews.collins.rockwell.com!not-for-mail From: Wayne Magor Newsgroups: comp.lang.ada Subject: Re: Does a null pointer always raise Constraint_Error? Date: Tue, 12 Dec 2000 10:23:57 -0600 Organization: Rockwell International Message-ID: <3A36511D.973D82BD@nowhere.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> NNTP-Posting-Host: gatekeeper.collins.rockwell.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.51 [en]C-CCK-MCD (WinNT; U) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:2999 Date: 2000-12-12T10:23:57-06:00 List-Id: Mike Silva wrote: > How does one choose the null value? I understand that the null value > need not be zero, but I always thought it was fixed in a given > compiler, or perhaps CPU architecture. 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). I seem to remember there was a problem with this. Either the hardware guys never considered that you might want a zero-length segment or we wanted to be compatible with the null from C (I think it was the h/w problem). In any case, for those h/w types that might read this... please allow for zero-length segments! I believe this is the "best" implementation for null. Wayne.