MISRAC2012-Rule-1.5_d
In this section:
Synopsis
(Required) Obsolescent language features shall not be used.
Enabled by default
Yes
Severity/Certainty
Medium/Medium

Full description
The ability to undefine and perhaps then redefine the macros bool, true, and false is an obsolescent feature.
Coding standards
- MISRA C:2012 Rule-1.5
(Required) Obsolescent language features shall not be used.
Code examples
The following code example fails the check and will give a warning:
#undef bool #undef false #define false 1 #undef true #define true 0
The following code example passes the check and will not give a warning about this issue:
#undef BOOL #undef FALSE #define FALSE -1 #undef MAYBE #define MAYBE 0 #undef TRUE #define TRUE 1