Re: LHS casting
Russell Shaw <rjshawN_o@s_pam.netspace.net.au> writes:
> gcc-4.7 -pedantic accepts:
> (*(volatile int *) 0x20) = 0;
You can't have a cast expression as the LHS of an assignment, because
a cast doesn't yield an lvalue. But that's what you have here.
`(volatile int *) 0x20` is a cast expression, and therefore not
an lvalue. Applying unary `*` to it gives you an lvalue. And a
parenthesized lvalue is still an lvalue.
Keith Thompson (The_Other_Keith) email@example.com <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|All times are GMT. The time now is 12:23 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.