diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 120448a2f48..6786780d23e 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -685,7 +685,7 @@ void CWriter::printConstant(Constant *CPV) { char Buffer[100]; uint64_t ll = DoubleToBits(FPC->getValue()); - sprintf(Buffer, "0x%llx", uint64_t(ll)); + sprintf(Buffer, "0x%llx", static_cast(ll)); std::string Num(&Buffer[0], &Buffer[6]); unsigned long Val = strtoul(Num.c_str(), 0, 16); diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 120448a2f48..6786780d23e 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -685,7 +685,7 @@ void CWriter::printConstant(Constant *CPV) { char Buffer[100]; uint64_t ll = DoubleToBits(FPC->getValue()); - sprintf(Buffer, "0x%llx", uint64_t(ll)); + sprintf(Buffer, "0x%llx", static_cast(ll)); std::string Num(&Buffer[0], &Buffer[6]); unsigned long Val = strtoul(Num.c_str(), 0, 16);