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

Jan Kratochvil
2012-09-10T19:43:42Z

On Mon, 10 Sep 2012 09:46:39 +0200, Jan Kratochvil wrote:
> I understand you are more concerned with MI but if I read correctly MI will
> answer it as 'y', unaware whether the query message gets propagated to your MI
> frontend so maybe you would like:
>
> if (query (_("Really assign to stored register in non-innermost frame? ")))
> warning (_("Assigning to register in non-innermost frame."));
> else
> error (_("Not confirmed."));

or to prevent double-warning in CLI mode:

if (!query (_("Really assign to stored register in non-innermost frame? ")))
error (_("Not confirmed."));
else if (ui_out_is_mi_like_p (uiout))
warning (_("Assigning to register in non-innermost frame."));

Thanks,
Jan