// Test: Subtracting pointers to different arrays
// Clause: 6.5.7 p37–p43 — when two pointers are subtracted, both shall point into the same array object; otherwise behavior is undefined.
#include <stdio.h>

int main(void) {
    int a[2] = {1,2};
    int b[2] = {3,4};
    ptrdiff_t d = (&a[1]) - (&b[0]); // UB: different arrays
    printf("%td\n", d);
    return 0;
}
