Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 21.8, assert, and abort
#1
Does the prohibition on calling the termination functions, specifically "abort", given by Rule 21.8 apply for any process that may arrive at abort? Or only to direct calls to abort requested by user-written code? This is of interest due to the definition of assert which indicates that it calls the "abort" function if the assert fails. Does 21.8, then, prohibit the use of assert?
<t></t>
Reply
#2
It is implicit that expansion of the assert() macro that includes a call to abort() is a violation to Rule 21.8.

The prohibition on calling the termination functions, including "abort", given by Rule 21.8 applies for any process that may arrive at such functions.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)