Re: [RFC] Don't allow setting register in non-innermost frame

Jan Kratochvil
2012-09-11T17:19:55Z

On Tue, 11 Sep 2012 19:12:31 +0200, Tom Tromey wrote:
> I would rather not use this approach.
> My reason is that there is no obvious connection between
> TYPE_OBJFILE_OWNED and register-ness -- and it is the sort of invariant
> that is very difficult to ensure will remain true over time.
>
> If lval_register can't work, then another choice would be a new flag on
> struct value. This would be somewhat ugly but, I think, more robust.

I also did not like TYPE_OBJFILE_OWNED too much, I was thinking putting it
possibly to
evaluate_subexp_standard <BINOP_ASSIGN>
checking there LHS (left hand side) expression, not the LHS value.

Sure one can easily create an expression escaping such check but it should
catch the normal problematic case; if there is any.

Thanks,
Jan