These variables are 'size_t' and thus should use %zu. On Windows,
'long' is always 32 bit.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Oh, sorry, I worked on a checkout a couple weeks old, where I ran into this warning. It does indeed seem to be fixed in the current git main branch.
Comment Actions
I fixed this in e69d359841b6358f1d17569212ef8cf91244ca11 and fixed some style issues.
This needs extra care.
While Clang -Wformat flags
printf("%llu", (size_t)3); warning: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
This is silent:
printf("%ld", (size_t)3);