Must casting destroy lvalueness?
NET-RELAY.ARPA
NET-RELAY.ARPA
Tue Oct 21 08:11:17 AEST 1986
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?"
More information about the Comp.lang.c
mailing list