Article View: comp.std.c
Article #3205Re: call to revolt
From: Norman Diamond
Date: Thu, 27 Jun 1991 00:24
Date: Thu, 27 Jun 1991 00:24
24 lines
1597 bytes
1597 bytes
In article <992@baby.and.nl> jos@and.nl (J. Horsmeier) writes: >Hi there, I'll die if casting lvals is going to be illegal. Well, you can cast an lval, but the result is not an lval. I guess you mean you'll die if the result of a cast isn't an lval. I guess you've been dead ever since casts were added to C, around 1978, except for brief intervals on some BSD-based compilers. >type* Thing; >((int)Thing)= Thing-Base+1; You'll die if you have to write Thing = (type*) (Thing-Base+1); My heart bleeds for you. Incidentally, your code would fail if int is smaller than pointers to "type," for example if int is 32 bits and pointers are 48 bits. My suggestion would fail if the implementation is excessively perverse, but not due to reasonable hardware architectures. -- Norman Diamond diamond@tkov50.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it. Permission is granted to feel this signature, but not to look at it.
Technical Details
Message-ID:
<1991Jun27.002412.10929@tkou02.enet.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit533!diamondReferences:
<rabson.677868220@physics.ubc.ca> <992@baby.and.nl>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit533!diamond From: diamond@jit533.swstokyo.dec.com (Norman Diamond) Newsgroups: comp.std.c Subject: Re: call to revolt Message-ID: <1991Jun27.002412.10929@tkou02.enet.dec.com> Date: 27 Jun 91 00:24:12 GMT References: <rabson.677868220@physics.ubc.ca> <992@baby.and.nl> Sender: usenet@tkou02.enet.dec.com (USENET News System) Reply-To: diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 24