This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Structure Return Testcase
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
Richard> The reason I liked a different tree code is that in most
Richard> places that we use modify_expr, we don't _have_ to prove
Richard> it's "safe". It's the user's responsibility to not
Richard> violate normal assignment constraints.
This is the key philosophical question: to be conservative here, or
not.
Jeff suggested that we be conservative -- until we have a chance to
find the places where we don't need to be, which certainly include
ordinary assignment expressions in C-like front-ends. The alternative
(your suggestion) is to be aggressive -- since we've been broken
before in this respect, continue to be broken, and try to find the
places that introduce the brokenness and fix them there.
The reason I think a bit (rather than a new code) is a good idea is
that almost all of the handling of such an expression is the same as
for a MODIFY_EXPR -- the only difference is that if you can't
atomically move the storage, then you do something different. So, by
not adding a code we avoid having to change a bazillion case
statements to handle COPY_EXPR, and treat it just like MODIFY_EXPR.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com