* [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32
@ 2012-11-29 12:13 Kai Tietz
2012-11-29 13:41 ` Kai Tietz
0 siblings, 1 reply; 4+ messages in thread
From: Kai Tietz @ 2012-11-29 12:13 UTC (permalink / raw)
To: GCC Patches
Hello,
this trivial patch fixes a bootstrap issue on LLP64 hosts.
ChangeLog
2012-11-29 Kai Tietz
PR target/53912
* tree-dump.c (dump_pointer): Cast from pointer via intptr_t.
Tested for i686-w64-mingw32, x86_64-w64-mingw32, and
x86_64-unknown-gnu-linux. Ok for apply?
Regards,
Kai
Index: tree-dump.c
===================================================================
--- tree-dump.c (Revision 193925)
+++ tree-dump.c (Arbeitskopie)
@@ -177,7 +177,8 @@ void
dump_pointer (dump_info_p di, const char *field, void *ptr)
{
dump_maybe_newline (di);
- fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
+ fprintf (di->stream, "%-4s: %-8lx ", field,
+ (unsigned long) (uintptr_t) ptr);
di->column += 15;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32
2012-11-29 12:13 [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32 Kai Tietz
@ 2012-11-29 13:41 ` Kai Tietz
2012-12-02 9:11 ` Kai Tietz
2012-12-03 3:50 ` Ian Lance Taylor
0 siblings, 2 replies; 4+ messages in thread
From: Kai Tietz @ 2012-11-29 13:41 UTC (permalink / raw)
To: GCC Patches
Updated variant using HOST_WIDE_INT_PRINT.
Tested for i686-w64-mingw32 and x86_64-w64-mingw32. Ok for apply?
Kai
Index: tree-dump.c
===================================================================
--- tree-dump.c (Revision 193925)
+++ tree-dump.c (Arbeitskopie)
@@ -177,7 +177,8 @@ void
dump_pointer (dump_info_p di, const char *field, void *ptr)
{
dump_maybe_newline (di);
- fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
+ fprintf (di->stream, "%-4s: %-8" HOST_WIDE_INT_PRINT "x ", field,
+ (HOST_WIDE_INT) (uintptr_t) ptr);
di->column += 15;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32
2012-11-29 13:41 ` Kai Tietz
@ 2012-12-02 9:11 ` Kai Tietz
2012-12-03 3:50 ` Ian Lance Taylor
1 sibling, 0 replies; 4+ messages in thread
From: Kai Tietz @ 2012-12-02 9:11 UTC (permalink / raw)
To: GCC Patches
Ping
2012/11/29 Kai Tietz <ktietz70@googlemail.com>:
> Updated variant using HOST_WIDE_INT_PRINT.
>
> Tested for i686-w64-mingw32 and x86_64-w64-mingw32. Ok for apply?
>
> Kai
>
> Index: tree-dump.c
> ===================================================================
> --- tree-dump.c (Revision 193925)
> +++ tree-dump.c (Arbeitskopie)
> @@ -177,7 +177,8 @@ void
> dump_pointer (dump_info_p di, const char *field, void *ptr)
> {
> dump_maybe_newline (di);
> - fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
> + fprintf (di->stream, "%-4s: %-8" HOST_WIDE_INT_PRINT "x ", field,
> + (HOST_WIDE_INT) (uintptr_t) ptr);
> di->column += 15;
> }
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32
2012-11-29 13:41 ` Kai Tietz
2012-12-02 9:11 ` Kai Tietz
@ 2012-12-03 3:50 ` Ian Lance Taylor
1 sibling, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2012-12-03 3:50 UTC (permalink / raw)
To: Kai Tietz; +Cc: GCC Patches
On Thu, Nov 29, 2012 at 5:40 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Updated variant using HOST_WIDE_INT_PRINT.
>
> Tested for i686-w64-mingw32 and x86_64-w64-mingw32. Ok for apply?
>
> Kai
>
> Index: tree-dump.c
> ===================================================================
> --- tree-dump.c (Revision 193925)
> +++ tree-dump.c (Arbeitskopie)
> @@ -177,7 +177,8 @@ void
> dump_pointer (dump_info_p di, const char *field, void *ptr)
> {
> dump_maybe_newline (di);
> - fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
> + fprintf (di->stream, "%-4s: %-8" HOST_WIDE_INT_PRINT "x ", field,
> + (HOST_WIDE_INT) (uintptr_t) ptr);
> di->column += 15;
> }
You should cast to (unsigned HOST_WIDE_INT), not (HOST_WIDE_INT). The
%x printf conversion specifier expects an unsigned type. This is OK
with that change and a ChangeLog entry.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-03 3:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29 12:13 [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32 Kai Tietz
2012-11-29 13:41 ` Kai Tietz
2012-12-02 9:11 ` Kai Tietz
2012-12-03 3:50 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).