[Patch] Give more chance to 'simplify_plus_minus' in simplify-rtx.c too catch something

Giovanni Bajo rasky@develer.com
Sat Feb 4 12:19:00 GMT 2006


Christophe Jaillet <christophe.jaillet@wanadoo.fr> wrote:

> I also removed a 'gcc_assert (n_ops >= 2)' which can't trigger because
n_ops
> = 2 at the entry of the function and it can only increase (at least where
> the assert is placed)


Of course it can't: in fact, if it triggered, compilation would abort.

Please don't remove gcc_assert unless they're wrong (as in buggy). Even if
the state the obvious, the obvious might change in the future, and they
serve as a reminder of what can and cannot be done. Specifically, the
scenario you're describing which makes impossible for that assert to trigger
might change in the future and become much less obvious.
-- 
Giovanni Bajo



More information about the Gcc-patches mailing list