ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
29 марта
1042057 Топик полностью
evgeniy1294 (04.10.2020 19:34, просмотров: 358) ответил teap0t на Не припомню таких запретов. IAR в дефолтном режиме MISRA2004 ошибок не находит.
Array indexing is the only acceptable form of pointer arithmetic, because it is clearer and hence less error prone than pointer manipulation. This rule bans the explicit calculation of pointer values. Array indexing shall only be applied to objects defined as an array type. Any explicitly calculated pointer value has the potential to access unintended or invalid memory addresses. Pointers may go out of bounds of arrays or structures, or may even point to effectively arbitrary 

locations. See also Rule 21.1.