From -3301407785606099100
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e94695845965b249
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1992-12-08 06:34:40 PST
Path: sparky!uunet!mdcbbs!swordfish!alanb
Newsgroups: comp.std.c++
Subject: Re: Zero-length structures and pointer comparisons
Message-ID: <ALANB.92Dec8125547@catalina.sdl.mdcbbs.com>
From: alanb@sdl.mdcbbs.com (Alan Braggins)
Date: 08 Dec 92 11:55:47 GMT
References: <1992Dec2.111003.23102@jyu.fi> 
 <1992Dec2.205330.10372@meaddata.com><1992Dec4.070720.13056@lth.se> <1992Dec07.222242.18703@microsoft.com>
Organization: Shape Data (Division of EDS), Cambridge UK
Nntp-Posting-Host: 134.244.153.110
In-reply-to: jimad@microsoft.com's message of 07 Dec 92 22:22:42 GMT
Lines: 17

>>>>> On 07 Dec 92 22:22:42 GMT, jimad@microsoft.com (Jim Adcock) said:

> If you want to compare addresses, then compare addresses.  If you
> want to compare pointers, then compare pointers.  A pointer is not
> an address.  An address is one particular implementation of a pointer.
> If you want to compare addresses, the following works on all computers
> and compilers I've ever had to deal with:

> if (((long)ptr_a) > ((long)ptr_b))
> 	blah();

For pointers to functions? pointers to virtual member functions?
--
     Alan Braggins, alanb@sdl.mdcbbs.com, abraggins@cix.compulink.co.uk
Shape Data - A division of EDS-Scicon Limited.   Cambridge, UK +44-223-316673
   "Any technology distinguishable from magic is insufficiently advanced."
 "My employer does not necessarily share my views - but I'm working on it."


