This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] cse.c: gcc_assertify an "if" statement whose condition is always false.
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Feb 05 08:51:34 EST
- Subject: Re: [patch] cse.c: gcc_assertify an "if" statement whose condition is always false.
Many of the gcc_assert calls we have do not pertain to wrong code; they
would simply result in somewhat harder-to-debug ICEs later on.
Yes, but many do and I don't think we have (or really want) a way to
distinguish between them.
And, we know that turning off asserts makes the compiler measurably
faster.
Yes, and also marginally less reliable since, as stated, not all of the
asserts would lead to other ICEs.
It's a judgement call, but I think the distinction between gcc_assert
and ENABLE_CHECKING is pretty artificial.
I disagree. I think ENABLE_CHECKING ought to be for things that are
expensive and that we don't want to be a released compiler. But most of the
assertions are cheap and I think they are worth the cost.