![]() |
|
MISRA-C:2004 Rule 12.13: (Advisory) |
|
||||
![]() | |||||||
* It can significantly impair the readability of the code.
* It introduces additional side effects into a statement with the potential for undefined behaviour.
It is safer to use these operations in isolation from any other arithmetic operators.
For example a statement such as the following is not compliant:
u8a=++u8b+u8c--;/* Not compliant */
The following sequence is clearer and therefore safer:
++u8b; u8a=u8b+u8c; u8c--;
QAC messages that encompass this guideline:
| 3440 | Using the value resulting from a ++ or -- operation. |
|
||
(c) The Motor Industry Research Association, 2004
|
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2 © 2013 Programming Research www.programmingresearch.com |
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |