Sam Steingold <s...@gnu.org> writes:

> Ben Pfaff wrote:
>> Bruno Haible <br...@clisp.org> writes:
>>
>>> What do the others think? Should we possibly extend stdlib.in.h so that
>>> abort() becomes a macro that produces a detailed error message, similar to
>>> what assert() does?
>>
>> Just changing abort() to assert(0) would improve the diagnostics
>> significantly.
>
> Sounds good.
> Actually,
>
> assert(foo())
>
> instead of
>
> if (!foo()) assert(0)
>
> wil probably produce an even better error message.

Unless you build with NDEBUG, in which case the entire assert(foo()) is
a no-op...

/Simon


Reply via email to