| MisraC2025 |
MisraC2025:10.1 |
Operands shall not be of an inappropriate essential type |
| MisraC2023 |
MisraC2023:10.1 |
Operands shall not be of an inappropriate essential type |
| Misra2012 |
Misra2012:10.1 |
Operands shall not be of an inappropriate essential type |
| Misra2004 |
Misra2004:6.1 |
The plain char type shall be used only for storage and use of character values |
| |
Misra2004:6.2 |
signed and unsigned char type shall be used only for the storage and use of numeric values |
| |
Misra2004:12.6 |
The operands of logical operators (&&, || and !) should be effectively Boolean. Expressions that are effectively Boolean should not be used as operands to operators other than (&&, || , !, =, ==, != and ?:) |
| |
Misra2004:12.7 |
Bitwise operators shall not be applied to operands whose underlying type is signed |
| |
Misra2004:12.9 |
The unary minus operator shall not be applied to an expression whose underlying type is unsigned |
| AUTOSARC++14 |
AUTOSARC++14:A4-5-1 |
Expressions with type enum or enum class shall not be used as operands to built-in and overloaded operators other than the subscript operator [ ], the assignment operator =, the equality operators == and ! =, the unary & operator, and the relational operators <, <=, >, >=. |
| |
AUTOSARC++14:M4-5-1 |
Expressions with type bool shall not be used as operands to built-in operators other than the assignment operator =, the logical operators &&, ||, !, the equality operators == and ! =, the unary & operator, and the conditional operator. |
| |
AUTOSARC++14:M4-5-3 |
Expressions with type (plain) char and wchar_t shall not be used as operands to built-in operators other than the assignment operator =, the equality operators == and ! =, and the unary & operator. |
| |
AUTOSARC++14:M5-0-11 |
The plain char type shall only be used for the storage and use of character values. |
| |
AUTOSARC++14:M5-0-12 |
Signed char and unsigned char type shall only be used for the storage and use of numeric values. |
| |
AUTOSARC++14:M5-0-14 |
The first operand of a conditional-operator shall have type bool. |
| |
AUTOSARC++14:M5-0-20 |
Non-constant operands to a binary bitwise operator shall have the same underlying type. |
| |
AUTOSARC++14:M5-0-21 |
Bitwise operators shall only be applied to operands of unsigned underlying type. |
| |
AUTOSARC++14:M5-3-1 |
Each operand of the ! operator, the logical && or the logical || operators shall have type bool. |
| |
AUTOSARC++14:M5-3-2 |
The unary minus operator shall not be applied to an expression whose underlying type is unsigned. |
| MisraC++2008 |
MisraC++2008:4-5-1 |
Expressions with type bool shall not be used as operands to built-in operators other than the assignment operator = , the logical operators && , || , ! , the equality operators == and != , the unary & operator, and the conditional operator. |
| |
MisraC++2008:4-5-2 |
Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ] , the assignment operator = , the equality operators == and != , the unary & operator, and the relational operators < , <= , > , >= . |
| |
MisraC++2008:4-5-3 |
Expressions with type (plain) char and wchar_t shall not be used as operands to built-in operators other than the assignment operator = , the equality operators == and != , and the unary & operator. |
| |
MisraC++2008:5-0-11 |
The plain char type shall only be used for the storage and use of character values. |
| |
MisraC++2008:5-0-12 |
signed char and unsigned char type shall only be used for the storage and use of numeric values. |
| |
MisraC++2008:5-0-14 |
The first operand of a conditional-operator shall have type bool. |
| |
MisraC++2008:5-0-20 |
Non-constant operands to a binary bitwise operator shall have the same underlying type. |
| |
MisraC++2008:5-0-21 |
Bitwise operators shall only be applied to operands of unsigned underlying type. |
| |
MisraC++2008:5-3-1 |
Each operand of the ! operator, the logical && or the logical || operators shall have type bool. |
| |
MisraC++2008:5-3-2 |
The unary minus operator shall not be applied to an expression whose underlying type is unsigned. |
| MisraC++2023 |
MisraC++2023:7.0.3 |
The numerical value of a character shall not be used |
| |
MisraC++2023:7.0.4 |
The operands of bitwise operators and shift operators shall be appropriate |
| |
MisraC++2023:8.3.1 |
The built-in unary - operator should not be applied to an expression of unsigned type |
| CERT-C |
CERT-C:EXP46-C |
Do not use a bitwise operator with a Boolean-like operand |
| |
CERT-C:INT07-C |
Use only explicitly signed or unsigned char type for numeric values |
| |
CERT-C:INT13-C |
Use bitwise operators only on unsigned operands |
| |
CERT-C:STR04-C |
Use plain char for characters in the basic character set |
| JSF++ |
JSF++:164.1 |
The left-hand operand of a right-shift operator shall not have a negative value. |
| |
JSF++:165 |
The unary minus operator shall not be applied to an unsigned expression. |