![]() |
|
MISRA-C:2004 Rule 5.2: (Required) |
|
||||
![]() | |||||||
Hiding identifiers with an identifier of the same name in a nested scope leads to code that is very confusing. For example:
int16_t i;{int16_t i;/* This is a different variable *//* This is not compliant */i=3;/* It could be confusing as to which i this refers */}
QAC messages that encompass this guideline:
| 2547 | This declaration of tag '%s' hides a more global declaration. |
| 3334 | This declaration of '%s' hides a more global declaration. |
|
||
(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 |