2 ms·
First, remember that getelementptr != array indices. Second, remember that even in C, you can't actually dereference things outside of the bounds of an object
by DannyBee 11y ago
First, remember that getelementptr != array indices.
Second, remember that even in C, you can't actually dereference things outside of the bounds of an object, even if you can form addresses to it.
In any case, the point was more than something like
struct foo C;
char *foo = &C
foo -= 7;
char whee = *foo;
Is legal in llvm, but not in say, C++ (and in fact, in most languages it's not legal because it's not aligned properly)