int a[20], b[20], *p = a, i; if ((uintptr_t)(a + 20) == (uintptr_t)b) { b[5] = 1; for (i = 0; i < 40; i++) *p++ = 0; printf("%d\n", b[5]); }
-
-
Replying to @ch3root
gcc 4.9 and 5.2 with -O2 print 1 while the right result is 0. How much black magic do you need, to explain that the code is invalid C?
4 replies 0 retweets 0 likes -
Replying to @RichFelker
@ch3root If this were valid C, then using A[1][0] to access A[0][1] in T A[2][2] should also be valid, no? But latter is ex. in Annex J.2 replies 0 retweets 0 likes
@ch3root Oops I wrote that wrong. Meant 0,2 to access 1,0.
3:56 AM - 23 Nov 2015
0 replies
0 retweets
0 likes
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.