== Why is this an issue?

It is implementation-defined whether the call stack is unwound before ``++terminate()++`` is called, so the destructors of any automatic objects may or may not be executed.


== Resources

* MISRA {cpp}:2008, 15-5-3
* MISRA {cpp}:2008, 15-3-1
* MISRA {cpp}:2008, 15-3-2
* MISRA {cpp}:2008, 15-3-4
* MISRA {cpp}:2008, 15-5-1


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

=== is related to: S1049

=== is related to: S1040

=== is related to: S1041

=== on 29 May 2014, 19:09:41 Ann Campbell wrote:
Not sure we can write a single rule for this. The MISRA doc simply refers to 15-3-1, 15-3-2, 15-3-4 and 15-5-1: "The situations addressed by these rules cause the program to call terminate() and so exhibit implementation-defined behaviour."

=== on 14 Oct 2014, 18:17:32 Ann Campbell wrote:
\[~samuel.mercier] please correct the following

* Code should be quoted in the message. Also, the message should be a full sentence, with initial capital letter and terminating period.
* Add a See section to the description listing the appropriate MISRA number
* Fill in Applicability.
* Make sure the appropriate MISRA C and MISRA {cpp} fields on the references tab are filled in

Also, while I appreciate that you added a Noncompliant Code Example, what you've added is an _explicit_ call to terminate, not an _implicit_ one. Please see my comment from May.

endif::env-github,rspecator-view[]
