------- Additional Comments From gcc2eran at tromer dot org  2005-07-08 09:18 
-------
(In reply to comment #13)
> In the C99 standard, 6.5.4 Cast Operators, Footnote 85 "A cast does not 
> yield an lvalue.  Thus, a cast to a qualified type has the same effect 
> as a cast to the unqualified version of the type."

But the object being accessed is the one designated by *dereferencing* the cast
expression, and *that* is an lvalue. Quoting N1124:

"[6.5.3.2/4] The unary * operator denotes indirection. If the operand [...]
points to an object, the result is an lvalue designating the
object. If the operand has type ‘‘pointer to type’’, the result has type
‘‘type’’."

And of course:

"[6.5.4/2] Preceding an expression by a parenthesized type name converts the
value of the expression to the named type. [...]"

I think this answers the first half of your quote (i.e., footnote 86), but I'm
not sure what to make of the second half, especially in light of the "Thus".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21568

Reply via email to