[flang-commits] [PATCH] D119015: [flang] Debugging of ACCESS='STREAM' I/O (take 2)

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Feb 4 10:58:11 PST 2022


klausler marked an inline comment as done.
klausler added inline comments.


================
Comment at: flang/runtime/file.cpp:164
+#ifdef _WIN32
+  isWindowsTextFile_ = true;
+#endif
----------------
Meinersbur wrote:
> I have a concern here: If `fd` is `<=2`, (stdout or stderr), it will be in text mode, which expects a single `\n` for a newline, but with `isWindowsTextFile_ = true`, we will write `\r\n` (which the c-runtime expands to `\r\r\n`).
When isWindowsTextFile_ is true, only the \n will be written.  See unit.cpp line 557 -- the emission of the \r is controlled by "if (!isWindowsTextFile())" (note the negation).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119015/new/

https://reviews.llvm.org/D119015



More information about the flang-commits mailing list