BTW, things work correctly when the objects live inside a real array:
#include <stdio.h>
int main(void) {
int arr[16];
int *p = &arr[0] + 1;
int *q = &arr[1];
printf("pointers: %p %p %d\n", p, q, p == q);
return 0;
}
The result is perfectly correct and predictable, as the Standard guarantees pointer comparisons in this case: pointers: 0x71b35ac790d4 0x71b35ac790d4 1
The original code in the article relies on UB, I think, so all bets are off.