From 4973622212445677058
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e94695845965b249
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1992-12-11 07:48:16 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: <1992Dec11.154104.5690@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.143504.5590@jyu.fi> <5343@holden.lulea.trab.se> <1992Dec10.051649.10282@jyu.fi>
Date: Fri, 11 Dec 1992 15:41:04 GMT
Lines: 30

In article <1992Dec10.051649.10282@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen) writes:
>In article <5343@holden.lulea.trab.se> jbn@lulea.trab.se (Johan Bengtsson) writes:
>>Markku Sakkinen (sakkinen@jyu.fi) wrote:
>
>You must have misunderstood the idea somehow in two ways.
>First, no matter how an object identifier is represented, it can always
>be interpreted as an integer or bit string for the purpose of
>ordering:  "violating the total ordering property" is impossible.
>

	I think you missed something here. It may well be possible
to have < > <= >= and the operator @ satifying

	a @ b means !(a<b) && !(a>b)

form a total order using bitwise comparisons (provided the pointers
are void *). However the operator @ need not be the operator ==,
it is quite possible for

	a < b && a == b

to be true, where < is bitwise and == the proper pointer comparison.
This will be immediately true on the 8086 unless all far
pointers are normalised. (== must normalise them, < need not).

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


