Hi Mike,

the issue is that formatter-width specifier %ll isn't supported for
all msvcrt-DLL versions, therefore gcc warns about its use.  The
variant for specifying 64-bit integer-scalar-width in formatter for
msvcrt in a backward-compatible way is by using %I64.

Regards,
Kai

2012/4/11 Mike Hommey <[email protected]>:
> Hi,
>
> I recently downloaded mingw-w64-gcc-4.6.3-runtime-2.0.1-static-ada-20120321.7z
> and when compiling some things with it, I end up with unexpected warnings for
> format strings. The problem can be reproduced with the following:
>
> ---->8-----
> #include <stdio.h>
> int main() {
>  size_t a = 1;
>  printf("%llu %llu\n", a, sizeof(a));
>  return 0;
> }
> -----8<----
>
> $ x86_64-w64-mingw32-gcc -o test test.c -Wall
> test.c: In function 'main':
> test.c:4:1: warning: unknown conversion type character 'l' in format 
> [-Wformat]
> test.c:4:1: warning: unknown conversion type character 'l' in format 
> [-Wformat]
> test.c:4:1: warning: too many arguments for format [-Wformat-extra-args]
>
>
> The resulting binary however works just fine.
>
> Sure, I could use %Iu, but it's less portable: with %llu, I only have to care
> about 32 vs 64 bits size_t...
>
> Mike
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to