I have found a curious exception to a multiple unsequenced modifications warning. I have come across the warning when looping a counter:
int i = 0;
i = ++i & 0xFF; // <- warning
warning: multiple unsequenced modifications to 'i'
t.i = ++t.i & 0xFF; // <- no warning
u = &t;
u->i = ++u->i & 0xFF; // <- no warning
Your two examples are identical as far as sequence points are concerned. Both of them invokes undefined behavior (as per 6.5), since
i is modified twice in the same expression with no sequence point in between. The data type of
i doesn't matter, nor does it matter if it is part of a struct.
It is not acceptable code. However, the compiler isn't required to give you a diagnostic for code that invokes undefined behavior. If you do get one, then that's awfully nice of the compiler.
The reason why your compiler is inconsistent in its warnings appears to be a minor compiler bug.