This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))


On 06/10/2011 10:20 AM, Richard Guenther wrote:
no, a VIEW_CONVERT_EXPR is generally not an lvalue (fold for example
would turn the above to (volatile int) a[1]).

The gimplifier seems to consider it an lvalue: gimplify_expr uses gimplify_compound_lval for it, and gimplify_addr_expr handles taking its address. And get_inner_reference handles it. So I think fold should be changed, and we should clarify that VIEW_CONVERT_EXPR is an lvalue.


If not, we need a new tree code for treating an lvalue as an lvalue of a different type without having to take its address; that's what I thought VIEW_CONVERT_EXPR was for.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]