This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Give more chance to 'simplify_plus_minus' in simplify-rtx.c too catch something
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: "Christophe Jaillet" <christophe dot jaillet at wanadoo dot fr>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 4 Feb 2006 13:19:42 +0100
- Subject: Re: [Patch] Give more chance to 'simplify_plus_minus' in simplify-rtx.c too catch something
- References: <ds1olu$duf$1@sea.gmane.org>
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