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: [PATCH] gen_lowpart and lvalues


On Thu, Feb 24, 2005 at 04:32:36PM -0700, Roger Sayle wrote:
> 1.1  (law 11-Aug-97): /* Must be a hard reg that's not valid in MODE.  */
> 1.1  (law 11-Aug-97): result = gen_lowpart_common (mode, copy_to_reg (x));

Not an lvalue to begin with.

> 1.6  (law 02-Nov-97): else if (GET_CODE (x) == ADDRESSOF)
> 1.6  (law 02-Nov-97):   return gen_lowpart (mode, force_reg (GET_MODE (x), x));

Neither is this.

If we don't *start* with an lvalue, then obviously it's ok if the
result isn't an lvalue.

> Everyone is talking about this as if it is somehow a recent change!

Right or wrong, I'd guess that > 50% of all uses of gen_lowpart 
expect lvalue semantics.  You've simply got to accept that.


r~


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