I've been using Pelles 64-bit C version for over two years now and just ran into the following problem for the first time. I set up a program like this:

unsigned long long int num = 18446744073709551615; // largest unsigned long long int

printf("num = %llu\n", num);

and it always converts this value to: 9223372036854775807, the largest long long int value. I assume that there is an overflow or two's complement occuring, but haven't been able to determine where or how. Ostensibly, 18446744073709551615 is an 8 byte (64-bit) value. Am I doing something wrong?

Logman