2012/8/8 Kai Tietz <[email protected]>

> This issue is caused by default of POSIX-printf/scanf for g++.  The
> reason is that g++ applies to printf/scanf functions two times
> formatting rules.  One time automagical as system-default, and
> secondly as specified by headers.  So those warnings are occuring.


> This might be worth a bug report on gcc's bugzilla.
>

Further reduction to (removed unistd.h):
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <fstream>
int main(int argc,char **argv)
{
   uint64_t val=1234567890;
   printf("%"PRId64"\n",val);
   exit(0);
}

produces this warning with x86_64-w64-mingw32 clang 3.1:
test.cpp:10:14: warning: invalid conversion specifier 'I'
      [-Wformat-invalid-specifier]
   printf("%"PRId64"\n",val);
           ~~^
M:/Development/mingw64/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\inttypes.h:42:17:
note:
      expanded from macro 'PRId64'
#define PRId64 "I64d"
                ^
And also a (different) warning with GCC x86_64.

Is this also a bug (in Clang)?

Ruben


> Regards,
> Kai
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to