Article View: net.lang.c
Article #9585Must casting destroy lvalueness?
From: NET-RELAY.ARPA
Date: Wed, 15 Oct 1986 10:35
Date: Wed, 15 Oct 1986 10:35
26 lines
1678 bytes
1678 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:
<4617@brl-smoke.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!rutgers!caip!brl-adm!brl-smoke!smoke!ASCVX5::GUTHERY%slb-test.csnet@CSNET-RELAY.ARPAShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!rutgers!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: <4617@brl-smoke.ARPA> Date: Wed, 15-Oct-86 06:35:01 EDT Article-I.D.: brl-smok.4617 Posted: Wed Oct 15 06:35:01 1986 Date-Received: Fri, 17-Oct-86 22:19:39 EDT Sender: news@brl-smoke.ARPA Lines: 26