- local variable
- static/global variable
- class member variable
- function parameter
Code: Select all
void f(int x) { for (; x<10; ++x) {}}
- reference
Code: Select all
void f(int& x) { for (x=0; x<10; ++x) {}}
However, other Misra rules like 0-1-3 seem to consider "variable" to include non-static class members and even bit fields.