Fix Note 952 for array[] vs. MISRA C++:2008 Rule 7-1-1
Rule 7–1–1 (Required) states "A variable which is not modified shall be const qualified"
PC-lint Plus issues note 952 (as a violation of rule 7-1-1) for function parameters including array[] or const array[].
However in C++, array[] or const array[], cannot be qualified also as array[const] as in C99.
Technically, note 952 should not be issued for array[].
Note, that the obvious workaround of replacing array[] with *const array, is not really a solution
as it triggers note 9016 (performing pointer arithmetic via addition/subtraction) in most cases
for violation of MISRA C++ required Rule 5-0-15 (Array indexing shall be the only form of pointer
arithmetic), when the array is accessed via [ ] which is incompatible with the pointer declaration
according to MISRA and their very vivid examples.
So, due to the MISRA ill-conceived mutually exclusive rules, one has to pollute the code with
numerous lint -esym(952, ...) suppression for array parameters or suppress -e952 globally,
which is clearly not the right solution.

Hi Charles,
In this case the recommendation is to use * const Array mentioned previously instead of uint8_t Array[]. Which would prevent unintended assignment to Array.
We issue 952 to:
- Alerts the programmer to cases where const can be employed to prevent the variable from being unintentionally modified (the primary point of the elective note)
- MISRA C++ Rule 7-1-1 states that "a variable which is not modified shall be const qualified" and does not contain an exemption for parameters declared as arrays.
If you want to suppress message 952 where a function parameter is declared as an incomplete array type. You can do so with the option:
+misra_interpret(c++2008, permit unmodified non-const incomplete array parameters)
This option is documented in section 4.7 of the Reference Manual.
Best,
PC-lint Plus Technical Support