From -3340690969255911024
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e94695845965b249
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1992-12-09 15:21:08 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: <1992Dec9.222423.8917@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: <1992Dec4.070720.13056@lth.se> <1992Dec07.222242.18703@microsoft.com> <1992Dec8.103218.27689@lth.se>
Date: Wed, 9 Dec 1992 22:24:23 GMT
Lines: 26

In article <1992Dec8.103218.27689@lth.se> dag@seldon.control.lth.se (Dag Bruck) writes:
>type "p" and "q",
>
>	p != q  <=>  long(p) > long(q)  |  long(p) < long(q)
>
>I assume this is not the case now, but if a trivial change in the
>standard document would give us this guarantee, the problem is solved
>and we need not discuss it anymore.
>
>If there are any problems, for example, if all significant bits of the
>pointers will not fit into a long integer, I think we're back to
>square one again and have to define "operator<" for pointers.  The
>alternative is of course to dismiss the idea as not worth the trouble.
>

	386: pointer is 48 bits, register is 32 bits

The standard doesnt requires a pointer to convert to a long, it says
that *if* it does, the reverse conversion gives back the same pointer.


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


