[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #18 from Uros Bizjak 2013-02-09 09:47:51 UTC --- Fixed again on 4.7 branch by #including "output.h" in lto.c.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #17 from Uros Bizjak 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--
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #16 from Uros Bizjak 2013-02-09 08:02:22 UTC --- 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?
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 Uros Bizjak changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED --- Comment #15 from Uros Bizjak 2013-02-07 19:20:07 UTC --- Fixed.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #14 from uros at gcc dot gnu.org 2013-02-07 19:18:40 UTC --- Author: uros Date: Thu Feb 7 19:18:27 2013 New Revision: 195865 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195865 Log: Backport from mainline 2013-02-07 Uros Bizjak PR bootstrap/56227 * ggc-page.c (ggc_print_statistics): Use HOST_LONG_LONG_FORMAT instead of "ll". * config/i386/i386.c (ix86_print_operand): Ditto. lto/ChangeLog: Backport from mainline 2013-02-07 Uros Bizjak PR bootstrap/56227 * lto.c (lto_resolution_ready): Use %wx instead of HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/i386/i386.c branches/gcc-4_7-branch/gcc/ggc-page.c branches/gcc-4_7-branch/gcc/lto/ChangeLog branches/gcc-4_7-branch/gcc/lto/lto.c
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #13 from uros at gcc dot gnu.org 2013-02-07 18:02:00 UTC --- Author: uros Date: Thu Feb 7 18:01:40 2013 New Revision: 195860 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195860 Log: PR bootstrap/56227 * ggc-page.c (ggc_print_statistics): Use HOST_LONG_LONG_FORMAT instead of "ll". * config/i386/i386.c (ix86_print_operand): Ditto. lto/ChangeLog: PR bootstrap/56227 * lto.c (lto_resolution_ready): Use %wx instead of HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/ggc-page.c trunk/gcc/lto/ChangeLog trunk/gcc/lto/lto.c
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 Uros Bizjak changed: What|Removed |Added URL||http://gcc.gnu.org/ml/gcc-p ||atches/2013-02/msg00298.htm ||l Target Milestone|--- |4.7.3 --- Comment #12 from Uros Bizjak 2013-02-07 12:59:43 UTC --- Patch at [1]. [1] http://gcc.gnu.org/ml/gcc-patches/2013-02/msg00298.html
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #11 from Kai Tietz 2013-02-07 10:15:42 UTC --- (In reply to comment #9) > Adding some CCs. The two changes about using HOST_LONG_LONG_FORMAT are fine. The use of HOST_WIDE_INT_PRINT_HEX_PURE in lto/lto.c is indeed wrong. The internal_error function uses %wx instead (AFAICS).
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #10 from Uros Bizjak 2013-02-07 10:07:43 UTC --- (In reply to comment #8) > > I don't see anything wrong with the above HOST_WIDE_INT_PRINT_HEX_PURE > > definition. Does this hints and some MinGW specific problem in type > > checking? > > internal_error takes GCC formats, not printf formats. > HOST_WIDE_INT_PRINT_HEX_PURE is a printf format and may not be valid for > direct use in GCC diagnostic functions. You need to use a GCC format such > as %wx here. Ah, sorry for not noticing this comment. I will prepare a complete patch.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 Uros Bizjak changed: What|Removed |Added CC||joseph at codesourcery dot ||com, ktietz at gcc dot ||gnu.org --- Comment #9 from Uros Bizjak 2013-02-07 10:06:12 UTC --- Adding some CCs.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #8 from joseph at codesourcery dot com 2013-02-07 01:48:56 UTC --- On Wed, 6 Feb 2013, ubizjak at gmail dot com wrote: > > The full line is, > > internal_error ("resolution sub id " HOST_WIDE_INT_PRINT_HEX_PURE > > " not in object file", id); > > > > Given that it's an internal error, I'm going to do a workaround so it will > > still build for me. > > I don't see anything wrong with the above HOST_WIDE_INT_PRINT_HEX_PURE > definition. Does this hints and some MinGW specific problem in type checking? internal_error takes GCC formats, not printf formats. HOST_WIDE_INT_PRINT_HEX_PURE is a printf format and may not be valid for direct use in GCC diagnostic functions. You need to use a GCC format such as %wx here.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #7 from Craig Powers 2013-02-06 20:19:15 UTC --- (In reply to comment #6) > (In reply to comment #5) > > ../../gcc-4.8-20130203/gcc/lto/lto.c: In function 'void > > lto_resolution_read(spla > > y_tree, FILE*, lto_file*)': > > ../../gcc-4.8-20130203/gcc/lto/lto.c:2229:33: error: unknown conversion type > > cha > > racter 'I' in format [-Werror=format=] > > " not in object file", id); > > ^ > > > > The full line is, > > internal_error ("resolution sub id " HOST_WIDE_INT_PRINT_HEX_PURE > > " not in object file", id); > > > > Given that it's an internal error, I'm going to do a workaround so it will > > still build for me. > > I don't see anything wrong with the above HOST_WIDE_INT_PRINT_HEX_PURE > definition. Does this hints and some MinGW specific problem in type checking? > > (I don't have access to MinGW platform, someone else should look a this > problem.) I have no idea, personally. I'm willing to try out proposed fixes for any issues, as long as I can run it in the background and not eat up time I should be spending getting other work done.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #6 from Uros Bizjak 2013-02-06 19:40:33 UTC --- (In reply to comment #5) > ../../gcc-4.8-20130203/gcc/lto/lto.c: In function 'void > lto_resolution_read(spla > y_tree, FILE*, lto_file*)': > ../../gcc-4.8-20130203/gcc/lto/lto.c:2229:33: error: unknown conversion type > cha > racter 'I' in format [-Werror=format=] > " not in object file", id); > ^ > > The full line is, > internal_error ("resolution sub id " HOST_WIDE_INT_PRINT_HEX_PURE > " not in object file", id); > > Given that it's an internal error, I'm going to do a workaround so it will > still build for me. I don't see anything wrong with the above HOST_WIDE_INT_PRINT_HEX_PURE definition. Does this hints and some MinGW specific problem in type checking? (I don't have access to MinGW platform, someone else should look a this problem.)
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #5 from Craig Powers 2013-02-06 19:03:10 UTC --- ../../gcc-4.8-20130203/gcc/lto/lto.c: In function 'void lto_resolution_read(spla y_tree, FILE*, lto_file*)': ../../gcc-4.8-20130203/gcc/lto/lto.c:2229:33: error: unknown conversion type cha racter 'I' in format [-Werror=format=] " not in object file", id); ^ The full line is, internal_error ("resolution sub id " HOST_WIDE_INT_PRINT_HEX_PURE " not in object file", id); Given that it's an internal error, I'm going to do a workaround so it will still build for me.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #4 from Craig Powers 2013-02-06 18:54:39 UTC --- (In reply to comment #3) > There's another one on line 14622 of gcc/config/i386/i386.c. Doing the same substitution as in ggc-page.c fixes it.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #3 from Craig Powers 2013-02-06 18:50:34 UTC --- There's another one on line 14622 of gcc/config/i386/i386.c.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #2 from Craig Powers 2013-02-06 18:42:58 UTC --- (In reply to comment #1) > Created attachment 29374 [details] > proposed patch to use HOST_LONG_LONG_FORMAT > > Please try to bootstrap with the attached patch. That fixes the error I had, thanks! It's still going right now, I'll add another update when it's done.
[Bug bootstrap/56227] Bootstrap failure on MinGW building ggc-page.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56227 --- Comment #1 from Uros Bizjak 2013-02-06 16:54:49 UTC --- Created attachment 29374 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29374 proposed patch to use HOST_LONG_LONG_FORMAT Please try to bootstrap with the attached patch.