]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/48431 (patch to fix a compile error in lto-plugin.c when using older C...
authorRichard Guenther <rguenther@suse.de>
Tue, 5 Apr 2011 12:11:08 +0000 (12:11 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 5 Apr 2011 12:11:08 +0000 (12:11 +0000)
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

lto-plugin/ChangeLog
lto-plugin/lto-plugin.c

index e4a19cd812439850419b8cfad8dfe9e780e03f7f..2e63db35451d9056a982af9d348a0df03858b1e3 100644 (file)
@@ -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.
index 64a0164da3cf1766d03633eb475605ba5d348040..661f10cdf9890309275bfacdc7fc32392756797b 100644 (file)
@@ -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;
     }