🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9618

Must casting destroy lvalueness?

#9618
From: NET-RELAY.ARPA
Date: Mon, 20 Oct 1986 22:11
26 lines
1662 bytes
I'm relatively new to info-c and don't know if you've had this debate
so just banish me to the archive if you have.

C pedants claim that casting destroys lvalueness.  Their argument is
essentially that they can imagine a machine on which casting forces
the use of a temp so lvalueness is gone.

C users, on the other hand, find they have to program real machines not
hypothetical ones and that almost all of these real machines don't use a 
temp when casting.  For example, a useful and readable way to move a pointer 
through a buffer containing a mixture of objects of different sizes is 

                       ((OBJECT)pointer)++

This construct is disallowed by Harbison's compiler. 

I fear that the C standards committee is going to take away such practical 
constructs and turn production quality C compilers into academic quality 
ones.  Who knows, there may develop a brisk business in C compilers that 
promise NOT to be standard conforming.

How sayeth the C standard committee?  How sayeth the users?

                                                        Regards, Scott

"You can hack any formalism so why not have useful formalisms?"
Technical Details
Message-ID: <4763@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!brl-adm!brl-smoke!smoke!ASCVX5::GUTHERY%slb-test.csnet@CSNET-RELAY.ARPA

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!brl-adm!brl-smoke!smoke!ASCVX5::GUTHERY%slb-test.csnet@CSNET-RELAY.ARPA
From: NET-RELAY.ARPA>@brl-smoke.ARPA
Newsgroups: net.lang.c
Subject: Must casting destroy lvalueness?
Message-ID: <4763@brl-smoke.ARPA>
Date: Mon, 20-Oct-86 18:11:17 EDT
Article-I.D.: brl-smok.4763
Posted: Mon Oct 20 18:11:17 1986
Date-Received: Wed, 22-Oct-86 03:21:16 EDT
Sender: news@brl-smoke.ARPA
Lines: 26