http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227
--- Comment #17 from Uros Bizjak <ubizjak at gmail dot com> 2013-02-09 08:17:41 UTC --- (In reply to comment #16) > I didn't notice that my backport to 4.7 caused: > > ../../gcc-svn/branches/gcc-4_7-branch/gcc/lto/lto.c:1060:68: warning: format > ‘%wx’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long > unsigned int’ [-Wformat] > > However, "%wx" _is_ correct in this case, and it works for 4.8 without > problems. > > Joseph, is there some additional magic that has to be added in lto/lto.c for > %wx to pass the check? To answer my own question - we have this typedef in output.h: /* This is a magic identifier which allows GCC to figure out the type of HOST_WIDE_INT for %wd specifier checks. You must issue this typedef before using the __asm_fprintf__ format attribute. */ typedef HOST_WIDE_INT __gcc_host_wide_int__; I am testing following additional patch: --cut here-- Index: lto.c =================================================================== --- lto.c (revision 195911) +++ lto.c (working copy) @@ -25,6 +25,7 @@ #include "toplev.h" #include "tree.h" #include "tree-flow.h" +#include "output.h" #include "diagnostic-core.h" #include "tm.h" #include "cgraph.h" --cut here--