Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!fortune!phipps From: phipps@fortune.UUCP (Clay Phipps) Newsgroups: net.lang.c Subject: Re: Pointer -> Long Conversion Message-ID: <3834@fortune.UUCP> Date: Fri, 20-Jul-84 18:28:13 EDT Article-I.D.: fortune.3834 Posted: Fri Jul 20 18:28:13 1984 Date-Received: Sat, 21-Jul-84 04:19:37 EDT References: <10@ism780b.UUCP> Organization: Fortune Systems, Redwood City, CA Lines: 21 Whether pointers should be sign-extended or not depends on the architecture of the host machine. Addresses in the ELXSI 6400 are *signed* 32-bit integers. Therefore, they should be sign-extended when converted to 64-bit "long", so that they retain their integral value in both sizes. Although signed addresses are unconventional, it turns out that they cause no problems whatsoever, and they removed the need to perform 32-bit unsigned arithmetic as a special case within the machine for address calculation. If minus signs on addresses bother you, just print addresses in hexadecimal (or octal, if you're an octopus :-), and you won't see them at all. -- Clay Phipps -- { amd hplabs!hpda sri-unix ucbvax!amd } !fortune!phipps { ihnp4 cbosgd decvax!decwrl!amd harpo allegra}