27-11-2019, 11:49 AM
You are correct that the usage of & and | on _Bool operands is well-defined and not-implementation defined.
However such code will still violates rule 10.1 which covers other forms of essentially boolean types which do have implementation-defined issues. The MISRA-C working group considers that the use of _Bool as an operand to a bitwise operator is not in the spirit of bitwise operators and likely to be confusing the reader.
However such code will still violates rule 10.1 which covers other forms of essentially boolean types which do have implementation-defined issues. The MISRA-C working group considers that the use of _Bool as an operand to a bitwise operator is not in the spirit of bitwise operators and likely to be confusing the reader.
Posted by and on behalf of the MISRA C Working Group