[PATCH] D142224: [Support] Emulate SIGPIPE handling in raw_fd_ostream write for Windows

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 26 14:51:34 PST 2023


mstorsjo added inline comments.


================
Comment at: llvm/lib/Support/Windows/Signals.inc:834
+  int RetCode = (int)EP->ExceptionRecord->ExceptionCode;
+  if (RetCode == (0xE0000000 | EX_IOERR))
+    return;
----------------
erichkeane wrote:
> aganea wrote:
> > erichkeane wrote:
> > > This patch seems to cause a self-build Werror regression.  The mask here is large enough to cause the RHS of this to be unsigned, so the comparison hits `-Wsign-compare`. See the example here https://godbolt.org/z/fa5q889jh
> > Please see rG1d0a5f11c04e6ac4dab578b81d02eabb83b31428
> Wonderful, thanks!  Looks like our build system didn't get to that yet.
Thanks @aganea for the fix! This has been backported to 16.x, so I filed a request to backport your warning fix too, see https://github.com/llvm/llvm-project/issues/61012.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142224



More information about the llvm-commits mailing list