Expressions (EXP)
- EXP30-C. Do not depend on the order of evaluation for side effects
- EXP32-C. Do not access a volatile object through a nonvolatile reference
- EXP33-C. Do not read uninitialized memory
- EXP34-C. Do not dereference null pointers
- EXP35-C. Do not modify objects with temporary lifetime
- EXP36-C. Do not cast pointers into more strictly aligned pointer types
- EXP37-C. Call functions with the correct number and type of arguments
- EXP39-C. Do not access a variable through a pointer of an incompatible type
- EXP40-C. Do not modify constant objects
- EXP42-C. Do not compare padding data
- EXP43-C. Avoid undefined behavior when using restrict-qualified pointers
- EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
- EXP45-C. Do not perform assignments in selection statements
- EXP46-C. Do not use a bitwise operator with a Boolean-like operand
- EXP47-C. Do not call va_arg with an argument of the incorrect type
Information for Editors
In order to have a new guideline automatically listed above be sure to label it exp and rule .
Risk Assessment Summary
| Rule | Severity | Likelihood | Detectable | Repairable | Priority | Level |
|---|---|---|---|---|---|---|
| EXP30-C | Medium | Probable | No | Yes | P8 | L2 |
| EXP32-C | Low | Likely | No | Yes | P6 | L2 |
| EXP33-C | High | Probable | No | Yes | P12 | L1 |
| EXP34-C | High | Likely | No | Yes | P18 | L1 |
| EXP35-C | Low | Probable | Yes | Yes | P6 | L2 |
| EXP36-C | Low | Probable | No | No | P2 | L3 |
| EXP37-C | Medium | Probable | No | No | P4 | L3 |
| EXP39-C | Medium | Unlikely | No | No | P2 | L3 |
| EXP40-C | Low | Unlikely | Yes | No | P2 | L3 |
| EXP42-C | Medium | Probable | Yes | Yes | P12 | L1 |
| EXP43-C | Medium | Probable | No | No | P4 | L3 |
| EXP44-C | Low | Unlikely | Yes | Yes | P3 | L3 |
| EXP45-C | Low | Likely | Yes | No | P6 | L2 |
| EXP46-C | Low | Likely | Yes | No | P6 | L2 |
| EXP47-C | Medium | Likely | No | No | P6 | L2 |
Related Rules and Recommendations
| FLP01-C. Take care in rearranging floating-point expressions |
| PRE01-C. Use parentheses within macros around parameter names |
| PRE02-C. Macro replacement lists should be parenthesized |


