Unified · Split
| @@ -204,6 +204,8 @@ void string_test() · 203 unmodified lines | ||
| 204 | 204 | printf("wc=%C 0x%lx %C\n", L'a', L'\x1234', L'c'); |
| 205 | 205 | printf("wstring=%S\n", L"abc"); |
| 206 | 206 | printf("wstring=%S\n", L"abc" L"def" "ghi"); |
| 207 | + printf("'\\377'=%d '\xff'=%d\n", '\377', '\xff'); | |
| 208 | + printf("L'\\377'=%d L'\xff'=%d\n", L'\377', L'\xff'); | |
| 207 | 209 | ps("test\n"); |
| 208 | 210 | b = 32; |
| 209 | 211 | while ((b = b + 1) < 96) { |
| @@ -425,6 +427,8 @@ void array_test(int a[4]) · 215 unmodified lines | ||
| 425 | 427 | printf("sizeof(unsigned short) = %d\n", sizeof(unsigned short)); |
| 426 | 428 | printf("sizeof(char) = %d\n", sizeof(char)); |
| 427 | 429 | printf("sizeof(unsigned char) = %d\n", sizeof(unsigned char)); |
| 430 | + printf("sizeof(\"a\") = %d\n", sizeof("a")); | |
| 431 | + printf("sizeof(__func__) = %d\n", sizeof(__func__)); | |
| 428 | 432 | printf("sizeof tab %d\n", sizeof(tab)); |
| 429 | 433 | printf("sizeof tab2 %d\n", sizeof tab2); |
| 430 | 434 | tab[0] = 1; |
| @@ -868,6 +872,11 @@ void cast_test() · 437 unmodified lines | ||
| 868 | 872 | tab[1] = 2; |
| 869 | 873 | tab[c] = 1; |
| 870 | 874 | printf("%d %d\n", tab[0], tab[1]); |
| 875 | + | |
| 876 | + /* test implicit casting on some operators */ | |
| 877 | + printf("sizeof(+(char)'a') = %d\n", sizeof(+(char)'a')); | |
| 878 | + printf("sizeof(-(char)'a') = %d\n", sizeof(-(char)'a')); | |
| 879 | + printf("sizeof(~(char)'a') = %d\n", sizeof(-(char)'a')); | |
| 871 | 880 | } |
| 872 | 881 | |
| 873 | 882 | /* initializers tests */ |