This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Have assert macros
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org, Dale Johannesen <dalej at apple dot com>, Zack Weinberg <zack at codesourcery dot com>
- Date: Wed, 25 Aug 2004 09:10:06 +0100
- Subject: Re: [RFC] Have assert macros
- Organization: Codesourcery LLC
- References: <412A49D5.2070809@codesourcery.com> <200408242331.37248.paul@codesourcery.com>
thanks for your comments,
Paul Brook wrote:
Why not gcc_abort() ?
I preferred naming it after what we are telling the compiler about
that point of the program, not after what we want the compiler to do --
after all we might come up with a better idea than getting it to abort :)
It may be that we implement a builtin telling the compiler that point
is unreachable, but don't do anything special if that turns out
to be untrue -- merely fall into the next block.
You'll notice the other one is not called 'gcc_abort_if_not_true' :)
Dale Johannesen wrote:
> On Aug 24, 2004, at 4:04 PM, Zack Weinberg wrote:
>> We're already redefining abort.
> I didn't realize. If everyone is OK with that, I have no objection, but
> usually people prefer to be standard-conformant.
As others have pointed out, this proposal would move us into conformance.
Zack Weinberg wrote:
> but I am undecided about whether these checks ought to be off in the
> release builds.
I'm not sure either, which is why I think the default should be to
leave them on.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk