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]

Re: C++ PATCH: PR 5079


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


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