Re: long long conversion specifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sisyphus wrote:
aimen bouchhima wrote:

On may 32-bit machine  -gcc version 3.3.2-
the following code
#include <stdio.h>
int main()
{
    unsigned long long int x = 0x1000000000000001ULL;
    printf("size = %d , value = %llx  \n ",sizeof(x),x);
    return 1;
}

results in :
size = 8 , value = 1000000000000001


For me: size = 8 , value = 1

gcc version 3.2.3 (mingw special 20030504-1)

Is that a MinGW bug or a gcc bug ?


Took a look on the MinGW users mailing list archive and found that the MSVC runtime's printf() doesn't know about 'll'.
The solution is to use 'I64' instead of 'll'.


Cheers,
Rob


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux