This is the mail archive of the gcc-help@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: Why can't I LD_PRELOAD __assert_fail ?


On 18 February 2011 04:25, Jeffrey Walton wrote:
> I could never understand
> why POSIX specified that a program should abort after an assert
> (http://pubs.opengroup.org/onlinepubs/009695399/functions/assert.html).

POSIX probably says that because C says that, and every implementation
does that, and standardising anything different would have been
incompatible with actual implementations.

That's what assert does, it aborts the program if the assertion fails.

If you want a different behaviour, don't use assert.


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