[flang-commits] [flang] c5a5517 - [flang] Fixing Windows build (take 3)
peter klausler via flang-commits
flang-commits at lists.llvm.org
Tue Oct 12 18:59:40 PDT 2021
Author: peter klausler
Date: 2021-10-12T18:59:33-07:00
New Revision: c5a5517be45af21c6db5a40880a75f68cd76cc7e
URL: https://github.com/llvm/llvm-project/commit/c5a5517be45af21c6db5a40880a75f68cd76cc7e
DIFF: https://github.com/llvm/llvm-project/commit/c5a5517be45af21c6db5a40880a75f68cd76cc7e.diff
LOG: [flang] Fixing Windows build (take 3)
Add explicit casts to replace implicit conversions and
recently deleted assignment operators from uint128.h
used in runtime/edit-output.cpp.
Added:
Modified:
flang/runtime/edit-output.cpp
Removed:
################################################################################
diff --git a/flang/runtime/edit-output.cpp b/flang/runtime/edit-output.cpp
index c5d5d6c1f0ab..f599cb0d2c96 100644
--- a/flang/runtime/edit-output.cpp
+++ b/flang/runtime/edit-output.cpp
@@ -25,14 +25,14 @@ bool EditIntegerOutput(IoStatementState &io, const DataEdit &edit,
case 'G':
case 'I':
if (isNegative) {
- un = -n;
+ un = -un;
}
if (isNegative || (edit.modes.editingFlags & signPlus)) {
signChars = 1; // '-' or '+'
}
while (un > 0) {
auto quotient{un / 10u};
- *--p = '0' + static_cast<int>(un - 10u * quotient);
+ *--p = '0' + static_cast<int>(un - Unsigned{10} * quotient);
un = quotient;
}
break;
@@ -398,7 +398,8 @@ template <int KIND> bool RealOutputEditing<KIND>::Edit(const DataEdit &edit) {
case 'O':
case 'Z':
return EditIntegerOutput<KIND>(io_, edit,
- decimal::BinaryFloatingPointNumber<binaryPrecision>{x_}.raw());
+ static_cast<common::HostSignedIntType<8 * KIND>>(
+ decimal::BinaryFloatingPointNumber<binaryPrecision>{x_}.raw()));
case 'G':
return Edit(EditForGOutput(edit));
default:
More information about the flang-commits
mailing list