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] Small cleanups to cse.c


On 11/25/06, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> Actually, that looks like a mistake.  I should have typed
>
>   if (!any_condjump_p (insn))
>     gcc_unreachable ();
>
> there, without the ENABLE_CHECKING.

Not the correct idiom either. :-)


Well, not incorrect, just different. You'll find the form I suggested
in a lot of places in GCC as well.

You probably simply want:

gcc_assert (any_condjump_p (insn));

This would also work, but in this form we wouldn't check that insn has the valid form if gcc is configured with assert checking disabled.

I prefer to err on the safe side and check this even with assert
checking disabled ;-)  But I don't feel strongly about it and I can go
with your suggestion if that's what most other folks prefer.

Gr.
Steven


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