This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))
- From: Mike Stump <mikestump at comcast dot net>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Richard Guenther <rguenther at suse dot de>, gcc-patches List <gcc-patches at gcc dot gnu dot org>, GCC <gcc at gcc dot gnu dot org>
- Date: Sun, 12 Jun 2011 19:47:37 -0700
- Subject: Re: Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))
- References: <4DEDB98F.6010508@redhat.com> <BANLkTimU_JPKgaqvhtb+m7fbDyTL340YJQ@mail.gmail.com> <4DEE2DCF.7020905@redhat.com> <BANLkTi=FX60RhEj2QF=t9MvkUCHR=D1m1A@mail.gmail.com> <4DEE3484.8030101@redhat.com> <4DF11FBC.3010304@redhat.com> <alpine.LNX.2.00.1106101029320.810@zhemvz.fhfr.qr> <4DF223D4.3080700@redhat.com> <alpine.LNX.2.00.1106101602530.810@zhemvz.fhfr.qr> <4DF22656.9050700@redhat.com> <alpine.LNX.2.00.1106101619070.810@zhemvz.fhfr.qr> <4DF3C98B.6070006@redhat.com> <BANLkTin8o9=mfL80u_MaWMSDyCYa61vdpQ@mail.gmail.com> <BANLkTimPmATmemAUMTD9Ty_=0y1ctx=ZvQ@mail.gmail.com>
On Jun 12, 2011, at 4:03 AM, Richard Guenther wrote:
> Btw, see tree.def which says
>
> /* Represents viewing something of one type as being of a second type.
> This corresponds to an "Unchecked Conversion" in Ada and roughly to
> the idiom *(type2 *)&X in C. The only operand is the value to be
> viewed as being of another type. It is undefined if the type of the
> input and of the expression have different sizes.
>
> This code may also be used within the LHS of a MODIFY_EXPR, in which
> case no actual data motion may occur. TREE_ADDRESSABLE will be set in
> this case and GCC must abort if it could not do the operation without
> generating insns. */
I wasn't able to follow what this was trying to say. :-( No actual data motion may occur? The wording is weasely. Does it mean: Data motion does not occur when used on the LHS of a MODIFY_EXPR? If so, it should just directly state it.