aboutsummaryrefslogtreecommitdiff
path: root/gold/reloc.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2016-02-06 09:53:58 -0800
committerCary Coutant <ccoutant@gmail.com>2016-02-06 09:53:58 -0800
commit2bf48941a7987cd1abedfb4ddbb45b75201381ad (patch)
tree6605c3ec3906b00f0b6ea8819ac756194ef410b5 /gold/reloc.h
parent1554f758410c4307103120424d35050e88433d85 (diff)
downloadgdb-2bf48941a7987cd1abedfb4ddbb45b75201381ad.zip
gdb-2bf48941a7987cd1abedfb4ddbb45b75201381ad.tar.gz
gdb-2bf48941a7987cd1abedfb4ddbb45b75201381ad.tar.bz2
Fix build failure in gold due to signed vs. unsigned comparisons.
* reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed comparison. (Bits::has_unsigned_overflow): Likewise.
Diffstat (limited to 'gold/reloc.h')
-rw-r--r--gold/reloc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/reloc.h b/gold/reloc.h
index 4f1e753..fce7313 100644
--- a/gold/reloc.h
+++ b/gold/reloc.h
@@ -1015,7 +1015,7 @@ class Bits
gold_assert(bits > 0 && bits <= 32);
if (bits == 32)
return false;
- int32_t max = static_cast<int32_t>((1U << bits) - 1);
+ uint32_t max = static_cast<int32_t>((1U << bits) - 1);
return val > max;
}
@@ -1081,7 +1081,7 @@ class Bits
gold_assert(bits > 0 && bits <= 64);
if (bits == 64)
return false;
- int64_t max = static_cast<int64_t>((static_cast<uint64_t>(1) << bits) - 1);
+ uint64_t max = static_cast<int64_t>((static_cast<uint64_t>(1) << bits) - 1);
return val > max;
}