rspec/rules/S990/rule.adoc
2021-01-27 13:42:22 +01:00

22 lines
625 B
Plaintext

``++<stdlib.h>++``'s ``++abort++``, ``++exit++``, ``++getenv++``, and ``++system++`` have implementation-defined behaviors, and should therefore be avoided.
== Noncompliant Code Example
----
#include <stdlib.h>
void f( ) {
exit(0); // Noncompliant
}
----
== See
* MISRA C:2004, 20.11 - The library functions abort, exit, getenv and system from library <stdlib.h> shall not be used.
* MISRA {cpp}:2008, 18-0-3 - The library functions abort, exit, getenv and system from library <cstdlib> shall not be used.
* MISRA C:2012, 21.8 - The library functions abort, exit, getenv and system of <stdlib.h> shall not be used