aboutsummaryrefslogtreecommitdiff
path: root/gold/icf.cc
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-02-22 18:26:29 +0000
committerDoug Kwan <dougkwan@google.com>2010-02-22 18:26:29 +0000
commitbb0bfe4f65b1808979cd1aacf6240c83575a4f92 (patch)
tree2cd2781922b7838cdfa159f69df0769d540611e0 /gold/icf.cc
parentc380a809dea581f548281e813edfc5b6e5007708 (diff)
downloadgdb-bb0bfe4f65b1808979cd1aacf6240c83575a4f92.zip
gdb-bb0bfe4f65b1808979cd1aacf6240c83575a4f92.tar.gz
gdb-bb0bfe4f65b1808979cd1aacf6240c83575a4f92.tar.bz2
2010-02-22 Doug Kwan <dougkwan@google.com>
* gold-threads.h (Once::~Once): Explicitly define virtual destructor. * icf.cc (get_section_contents): Cast snprintf arguments to long long types to avoid warnings due to different uint64_t implementations on different hosts.
Diffstat (limited to 'gold/icf.cc')
-rw-r--r--gold/icf.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/icf.cc b/gold/icf.cc
index 752aa55..ff2058c 100644
--- a/gold/icf.cc
+++ b/gold/icf.cc
@@ -278,8 +278,13 @@ get_section_contents(bool first_iteration,
// where first is the symbol value and second is the
// addend.
char addend_str[50];
- snprintf(addend_str, sizeof(addend_str), "%llx %llx %lux",
- (*it_a).first, (*it_a).second, (*it_o));
+
+ // It would be nice if we could use format macros in inttypes.h
+ // here but there are not in ISO/IEC C++ 1998.
+ snprintf(addend_str, sizeof(addend_str), "%llx %llx %llux",
+ static_cast<long long>((*it_a).first),
+ static_cast<long long>((*it_a).second),
+ static_cast<unsigned long long>(*it_o));
Section_id reloc_secn(it_v->first, it_v->second);
// If this reloc turns back and points to the same section,