[PATCH] D66023: Warning disable for mod-by-zero and union 'uninitialized' use

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 12:57:24 PDT 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: compiler-rt/lib/builtins/fixxfdi.c:50
 
 #endif // !_ARCH_PPC
+
----------------
I would put the warning pop inside the !_ARCH_PPC block. It would only be an issue in an _MSC_VER + PPC build.


================
Comment at: compiler-rt/lib/builtins/udivmoddi4.c:21-22
+#ifdef _MSC_VER
+// MSVC throws a warning about mod 0 here, disable it for builds that
+// warn-as-error
+#pragma warning(push)
----------------
I think the % by 0 will happen only in the cases where the user actually does division by zero, and that's actually the desired behavior.


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

https://reviews.llvm.org/D66023





More information about the llvm-commits mailing list