From c5a5517be45af21c6db5a40880a75f68cd76cc7e Mon Sep 17 00:00:00 2001 From: peter klausler Date: Tue, 12 Oct 2021 18:57:58 -0700 Subject: [PATCH] [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. --- flang/runtime/edit-output.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flang/runtime/edit-output.cpp b/flang/runtime/edit-output.cpp index c5d5d6c..f599cb0 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(un - 10u * quotient); + *--p = '0' + static_cast(un - Unsigned{10} * quotient); un = quotient; } break; @@ -398,7 +398,8 @@ template bool RealOutputEditing::Edit(const DataEdit &edit) { case 'O': case 'Z': return EditIntegerOutput(io_, edit, - decimal::BinaryFloatingPointNumber{x_}.raw()); + static_cast>( + decimal::BinaryFloatingPointNumber{x_}.raw())); case 'G': return Edit(EditForGOutput(edit)); default: -- 2.7.4