MISRAC++2023-30.0.1
In this section:
Synopsis
(Required) The C Library input/output functions shall not be used
Enabled by default
Yes
Severity/Certainty
Low/Medium

Full description
Uses of stdio.h were found. This check is identical to MISRAC++2008-27-0-1, MISRAC2004-20.9, MISRAC2012-Rule-21.6.
Coding standards
- MISRA C:2004 20.9
(Required) The input/output library stdio.h shall not be used in production code.
- MISRA C:2012 Rule-21.6
(Required) The Standard Library input/output functions shall not be used
- MISRA C++ 2008 27-0-1
(Required) The stream input/output library <cstdio> shall not be used.
Code examples
The following code example fails the check and will give a warning:
#include <stdio.h>
void example(void) {
printf("Hello, world!\n");
}
The following code example passes the check and will not give a warning about this issue:
void example(void) {
}