aboutsummaryrefslogtreecommitdiffstats
path: root/lib/builtins/fixunsxfsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builtins/fixunsxfsi.c')
-rw-r--r--lib/builtins/fixunsxfsi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/builtins/fixunsxfsi.c b/lib/builtins/fixunsxfsi.c
index 1432d8ba92d2..3bc1288d38a1 100644
--- a/lib/builtins/fixunsxfsi.c
+++ b/lib/builtins/fixunsxfsi.c
@@ -25,6 +25,13 @@
// eeee | 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm
// mmmm mmmm mmmm
+#if defined(_MSC_VER) && !defined(__clang__)
+// MSVC throws a warning about 'unitialized variable use' here,
+// disable it for builds that warn-as-error
+#pragma warning(push)
+#pragma warning(disable : 4700)
+#endif
+
COMPILER_RT_ABI su_int __fixunsxfsi(long double a) {
long_double_bits fb;
fb.f = a;
@@ -36,4 +43,8 @@ COMPILER_RT_ABI su_int __fixunsxfsi(long double a) {
return fb.u.low.s.high >> (31 - e);
}
+#if defined(_MSC_VER) && !defined(__clang__)
+#pragma warning(pop)
+#endif
+
#endif // !_ARCH_PPC