Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site turtlevax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!pesnta!amd!turtlevax!ken From: ken@turtlevax.UUCP (Ken Turkowski) Newsgroups: net.micro.68k,net.lang.c Subject: Re: Question of Ignorance Message-ID: <762@turtlevax.UUCP> Date: Tue, 14-May-85 12:32:16 EDT Article-I.D.: turtleva.762 Posted: Tue May 14 12:32:16 1985 Date-Received: Wed, 15-May-85 02:03:26 EDT References: <198@unccvax.UUCP> <1427@bbncca.ARPA> <5590@utzoo.UUCP> Reply-To: ken@turtlevax.UUCP (Ken Turkowski) Organization: CADLINC, Inc. @ Menlo Park, CA Lines: 18 Xref: watmath net.micro.68k:757 net.lang.c:5213 In article <5590@utzoo.UUCP> henry@utzoo.UUCP (Henry Spencer) writes: > > ... I recommend using one of the two constructs > > > > ( longptr == (long *)32 ) > > or ( (int)longptr == 32 ) > > > > which are guaranteed to do what you want ... > >Argh, WRONG!! Turn that "(int)" into "(long)" and I might agree. You >have no guarantees that an int is long enough to hold a pointer. Arghh! Wrong again. You can't cast an lvalue, so that the second option is not available. You MUST say longptr = (long *)32; -- Ken Turkowski @ CADLINC, Menlo Park, CA UUCP: {amd,decwrl,hplabs,nsc,seismo,spar}!turtlevax!ken ARPA: turtlevax!ken@DECWRL.ARPA