Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ll-xn!husc6!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.std.c Subject: Re: pointer comparisons in dpANS C Message-ID: <8729@smoke.BRL.MIL> Date: 22 Oct 88 20:05:47 GMT References: <1988Oct11.143728.28627@gpu.utcs.toronto.edu> <6777@chinet.chi.il.us> <8696@smoke.ARPA> <14061@mimsy.UUCP> <1988Oct21.143640.10468@ateng.ateng.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 9 In article <1988Oct21.143640.10468@ateng.ateng.com> chip@ateng.ateng.com (Chip Salzenberg) writes: >According to chris@mimsy.UUCP (Chris Torek): >>Every address returned by malloc must compare as not distinct from >>every other address, lest this routine delete the wrong object. In case I misled anyone by a previous posting, (in)equality comparison of pointers (having appropriate types) is supposed to work according to the proposed ANS for C even when the pointers are not into the same object. It is the order-relational comparison that requires that the pointers be into the same object.