Integer constants require a suffix to indicate the type.Quote:> I'm trying to use "long long" type.
>int main(int argc, char *argv)
> long long xx = 9000000000000000000;
>/* long long xx = 9000,000,000,000,000,000; */
> printf( "%Ld\n", (unsigned long long) xx );
>When I compile this with gcc v2.7.0, I see warnings.
>filename.c: In function `main':
>filename.c:3: warning: integer constant out of range
>filename.c:3: warning: decimal constant is so large that it is unsigned
>I don't hope to see any warnings. But I think it's not good to ignore all
>warning. How can I fix this warning?
1234 is type int
12345678L is type long
1234U is type unsigned
12345678UL is type unsigned long
123456780000LL is type long long
123456780000ULL is type unsigned long long
Correct use of these will eliminate the warning messages.
[.sig under construction]