This is the mail archive of the gcc@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]

Re: Semantics of MODIFY_EXPR with CONSTRUCTOR rhs


On Sun, Aug 01, 2004 at 11:20:06PM -0400, Richard Kenner wrote:
> Suppose we have this in .t03.original:
> 
>   r = {.x=5, .y=8};
>   r = {.x=1, .y=r.x};
> 
> Is the second statement valid?
...
> What's supposed to be happening here?

No one's defined it, is my guess.

I'd have been surprised if you'd told me we had supported this
in the rtl expanders, but I can only assume from the context of
this message that we did.

I suppose it makes logical sense to support it -- as if we're
creating a temporary object with the CONSTRUCTOR.  The tricky
bit will be to not pessimize the common case in which we do not
have overlap between the lhs and the rhs.

I suppose I can take a look at this problem this week...


r~


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