03-12-2018, 09:24 PM
misra-c Wrote:All your examples are compliant with rule 13.1. Taking the address of a volatile variable is not a "persistent side effect".
In the ®1 and ®2.bar examples, neither the & or * operator are evaluated - see C99 6.5.3.2(3).
For example: &(*(volatile uint16_t *)0x100) is equivalent to (volatile uint16_t *)0x100
I don't see how the exception in C99 6.5.3.2(3) applies in the case of ®2.bar since the operand of the & operator in this case is the result of the member access operator, not the * or [] operators. Can you please clarify your position and/or rationale for this part of the example?
<t></t>