This is the mail archive of the gcc@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: [RFC] Have assert macros


On Tue, 24 Aug 2004, Phil Edwards wrote:

> If Nathan's proposal goes in, this would probably be a good opportunity to
> switch to gcc_abort, and potentially poison abort.

And update the description of these conventions in codingconventions.html.  
(The message linked from there just states abort as the existing practice 
without any technical justification for it rather than assert.)

I agree with the proposed change to use gcc_assert and gcc_abort or 
similar.  I'd just add that the conversion process should include 
considering in each case whether there might be side-effects in the 
condition in "if (...) abort ();" before changing to an assert.  
Side-effects in such conditionals would be bad practice, but they might 
well happen somewhere in the compiler.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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