Valid C? int a[10], (*p)[9] = (void*)(a+1); (*p)[0] = 1;
The question is basically can an [M] array lvalue "alias" a length-M subrange of an [N] array? (M<N)
-
-
IMO no actual aliasing takes place because the _array_ is never accessed; it just decays to a pointer into big array.
-
But what about (*p)[-1]? Might compilers (wrongly?) treat it as undefined?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.