* [PATCH] Fix PR48431
@ 2011-04-05 12:11 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2011-04-05 12:11 UTC (permalink / raw)
To: gcc-patches
Committed.
Richard.
2011-04-05 Richard Guenther <rguenther@suse.de>
PR bootstrap/48431
* lto-plugin.c (claim_file_handler): Do not declare vars in code.
Index: lto-plugin/lto-plugin.c
===================================================================
*** lto-plugin/lto-plugin.c (revision 171978)
--- lto-plugin/lto-plugin.c (working copy)
*************** claim_file_handler (const struct ld_plug
*** 851,861 ****
/* We pass the offset of the actual file, not the archive header.
Can't use PRIx64, because that's C99, so we have to print the
64-bit hex int as two 32-bit ones. */
! int lo, hi;
lo = file->offset & 0xffffffff;
hi = ((int64_t)file->offset >> 32) & 0xffffffff;
! int t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi)
! : asprintf (&objname, "%s@0x%x", file->name, lo);
check (t >= 0, LDPL_FATAL, "asprintf failed");
lto_file.name = objname;
}
--- 851,861 ----
/* We pass the offset of the actual file, not the archive header.
Can't use PRIx64, because that's C99, so we have to print the
64-bit hex int as two 32-bit ones. */
! int lo, hi, t;
lo = file->offset & 0xffffffff;
hi = ((int64_t)file->offset >> 32) & 0xffffffff;
! t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi)
! : asprintf (&objname, "%s@0x%x", file->name, lo);
check (t >= 0, LDPL_FATAL, "asprintf failed");
lto_file.name = objname;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-05 12:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 12:11 [PATCH] Fix PR48431 Richard Guenther
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).