2006-11-09から1日間の記事一覧

でも

$ cat test.c #include <stdio.h> int main() { int x = 0; ~~(1 - 3 * (2 - x) / 3 + 1) = 123; printf("%d\n", x); } $ gcc-4.0 test.c && ./a.out 123さすがにそれは左辺値じゃないと思うな。</stdio.h>

なかなかアグレッシブ

$ cat test.c #include <stdio.h> #include <limits.h> int main() { int x = INT_MAX, y = INT_MAX; x = x * 10; x = x / 10; y = (y * 10) / 10; printf("%d <-> %d\n", x, y); } $ gcc-3.3 test.c && ./a.out -1 <-> -1 $ gcc-4.0 test.c && ./a.out -1 <-> 2147483647出てく</limits.h></stdio.h>…

転生

Revised^2 俺。