[PATCH] Vectorizing Global Structures - Take 2
Daniel Berlin
dberlin at dberlin.org
Fri Feb 15 16:46:34 PST 2013
> It would be explicitly valid to convert it to char *, and read it up
> to and through B, but not using the array access operator.
Sorry, to be precise, this should be "but not using the array access
operator on the original member"
IE char * foo = &<beginning struct containing A and B>
<walk through A, get to B>
This is allowed by 6.3.2.3 part 7:
When a pointer to an object is converted to a pointer to a character
type, the result points to the lowest addressed byte of the object.
Successive increments of the result, up to the size of the object,
yield pointers to the remaining bytes of the object.
Nothing else actually *allows this*, but it is still common in C to
try to do it :)
More information about the llvm-commits
mailing list