diff options
author | Richard Guenther <rguenther@suse.de> | 2011-04-05 12:11:08 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-04-05 12:11:08 +0000 |
commit | 3b8c1a3f49fbb96b55d872397234210d0cca6763 (patch) | |
tree | 8a9ac3757d606a15fa6e7ff7ff354cefd6681f87 /lto-plugin | |
parent | 1ed13f83ffbd38fede59d1f14553e22b4bb09201 (diff) | |
download | gcc-3b8c1a3f49fbb96b55d872397234210d0cca6763.zip gcc-3b8c1a3f49fbb96b55d872397234210d0cca6763.tar.gz gcc-3b8c1a3f49fbb96b55d872397234210d0cca6763.tar.bz2 |
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
Diffstat (limited to 'lto-plugin')
-rw-r--r-- | lto-plugin/ChangeLog | 5 | ||||
-rw-r--r-- | lto-plugin/lto-plugin.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index e4a19cd..2e63db3 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,8 @@ +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> * Makefile.in: Regenerate. diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 64a0164..661f10c 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -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. 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; + int lo, hi, t; 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); + 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; } |