#includeint main() { unsigned long value = 18446744073709551615; printf("SIZEOF ULONG: %lu", sizeof(unsigned long)); printf("VALUE: %lu", value); return 0; } bla.c: In function ‘main’: bla.c:5:27: warning: integer constant is so large that it is unsigned unsigned long value = 18446744073709551615; ^~~~~~~~~~~~~~~~~~~~
那么为什么gcc抱怨价值变大,我以为我已经宣布它是无符号的?