From -9139324979858592216
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e94695845965b249
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1992-12-12 09:07:14 PST
Newsgroups: comp.std.c++
Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Zero-length structures and pointer comparisons
Message-ID: <1992Dec12.154918.2220@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: extro.ucc.su.oz.au
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
References: <1992Dec8.103218.27689@lth.se> <1992Dec8.173855.18153@meaddata.com> <1992Dec9.075125.22405@lth.se>
Date: Sat, 12 Dec 1992 15:49:18 GMT
Lines: 22

In article <1992Dec9.075125.22405@lth.se> dag@bellman.control.lth.se (Dag Bruck) writes:
>	p != q   <=>   p < q   |   p > q
>
>for all pointers.  I'm not asking for a particular ordering, just an
>implementation defined behaviour that meets the equivalence above.
>
	Since existing 8086 implementations do not satisfy the above
condition, yet are conforming programs, would you accept Fergus
Henderson's suggestion:

	p != q <=>  ptrcmp(p,q)<0 || ptrcmp(p,q)>0

which cannot break existing implementations but provides a  total
order by way of a library function? If so, can we put this to
the library WG?


-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------


