C:\Users\Tony\dev\perl\git>gcc -Wformat -oint64.exe int64.c
int64.c: In function 'main':
int64.c:6:15: warning: format '%u' expects argument of type 'unsigned
+int', but argument 2 has type 'long long unsigned int' [-Wformat=]
6 | printf("%I64u\n", x);
| ~~~~^ ~
| | |
| | long long unsigned int
| unsigned int
| %I64llu
C:\Users\Tony\dev\perl\git>type int64.c
#include <stdio.h>
unsigned long long x = 0;
int main() {
printf("%I64u\n", x);
}
If it is a bug, it's a bug in perl, since that's where the macro OP is using comes from.
I've considered changing the Win32 config in perl to use "%llu"/"%lld" instead, but testing against the older versions of MSVCRT in older Windows that we theoretically support is difficult. |