C++ PATCH: PR 5079
Mark Mitchell
mark@codesourcery.com
Thu Aug 28 16:04:00 GMT 2003
On Thu, 2003-08-28 at 06:30, Jason Merrill wrote:
> On Thu, 28 Aug 2003 00:11:44 -0700, Mark Mitchell <mark@codesourcery.com> wrote:
>
> > PR optimization/5079
> > * call.c (build_conditional_expr): Use decl_constant_value to
> > simplify the arguments.
>
> You can't do that here if the ?: is an lvalue, as it is in the testcase.
You're right of course.
The correct solution is to know whether you're building an lvalue or an
rvalue as you go. (That would allow us to represent all lvalues as
pointers as we go, which would avoid busily converting from reference
type to rvalue type only to convert right back, which we too all over
the place.)
Obviously, that's a big change.
I'll see what I can do; at worst, I'll just revert my patch.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
More information about the Gcc-patches
mailing list