Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Because assert() calls abort(), cleanup functions registered with atexit() are not called. If the intention of the programmer is properly cleanup in the case of a failed assertion, a signal handler that calls exit() should be installed to handle SIGABRT.

Wiki MarkupSee \[[ERR04-A. Choose an appropriate termination strategy]\] for more information on program termination strategies and \[[MSC11-A. Incorporate diagnostic tests using assertions]\] for more information on using the {{assert()}} macro.

Non-Compliant Code Example

...