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] 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.


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