Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: Failure of "long x(cp) char * cp; { return *((long *) cp); }" is a bug? Message-ID: <5721@alice.uUCp> Date: Sun, 29-Jun-86 15:07:18 EDT Article-I.D.: alice.5721 Posted: Sun Jun 29 15:07:18 1986 Date-Received: Mon, 30-Jun-86 06:04:50 EDT References: <6152@elsie.UUCP> Organization: Bell Labs, Murray Hill Lines: 8 > Isn't this really a compiler bug? Doesn't the cast in the > return *((long *) cp); > give the compiler all the evidence it needs that it should, *on its own*, > produce code that's the equivalent of the function call? When you cast a pointer type to another pointer type, you have stepped outside the bounds of the language. The implementation is entitled to do as it pleases.