Commit 3b8c1a3f by Richard Guenther Committed by Richard Biener

re PR lto/48431 (patch to fix a compile error in lto-plugin.c when using older C compilers)

2011-04-05  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/48431
	* lto-plugin.c (claim_file_handler): Do not declare vars in code.

From-SVN: r171982
parent 1ed13f83
2011-04-05 Richard Guenther <rguenther@suse.de>
PR bootstrap/48431
* lto-plugin.c (claim_file_handler): Do not declare vars in code.
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate. * Makefile.in: Regenerate.
......
...@@ -851,11 +851,11 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed) ...@@ -851,11 +851,11 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed)
/* We pass the offset of the actual file, not the archive header. /* 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 Can't use PRIx64, because that's C99, so we have to print the
64-bit hex int as two 32-bit ones. */ 64-bit hex int as two 32-bit ones. */
int lo, hi; int lo, hi, t;
lo = file->offset & 0xffffffff; lo = file->offset & 0xffffffff;
hi = ((int64_t)file->offset >> 32) & 0xffffffff; hi = ((int64_t)file->offset >> 32) & 0xffffffff;
int t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi) t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi)
: asprintf (&objname, "%s@0x%x", file->name, lo); : asprintf (&objname, "%s@0x%x", file->name, lo);
check (t >= 0, LDPL_FATAL, "asprintf failed"); check (t >= 0, LDPL_FATAL, "asprintf failed");
lto_file.name = objname; lto_file.name = objname;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment