[m-rev.] diff: delete an old workaround for MSVC
Julien Fischer
jfischer at opturion.com
Tue Oct 18 01:53:49 AEDT 2022
Delete an old workaround for MSVC.
library/float.m:
We no longer require an MSVC specific workaround because Microsoft's
sprintf() implementation does not support the lld conversion specifier.
(It has been supported since 2013.)
README.MS-VisualC:
Document that the oldest version of MSVC that can be used to build
Mercury is MSVC 12 (2013).
Julien.
diff --git a/README.MS-VisualC b/README.MS-VisualC
index 638ebb5..19c325f 100644
--- a/README.MS-VisualC
+++ b/README.MS-VisualC
@@ -3,9 +3,8 @@
BUILDING WITH MICROSOFT VISUAL C++
Mercury has been ported to use the Microsoft Visual C++ compiler.
-It has been tested with versions 9.0 (2008) through 12.0 (2013).
-Version 8.0 (2005) should also work but we have not tested that with Mercury
-recently.
+It requires at least version 12.0 (2013); older versions lack sufficient C99
+support.
-----------------------------------------------------------------------------
diff --git a/library/float.m b/library/float.m
index 3ca6e56..76cc293 100644
--- a/library/float.m
+++ b/library/float.m
@@ -1212,14 +1212,7 @@ float_to_doc(X) = str(string.float_to_string(X)).
char buf[64];
u.f = (double) Flt;
- #if defined(MR_MSVC)
- // The I64 size prefix is specific to the Microsoft C library
- // -- we use it here since MSVC does not support the standard
- // ll size prefix.
- sprintf(buf, ""%I64d"", u.i);
- #else
- sprintf(buf, ""%"" MR_INT_LEAST64_LENGTH_MODIFIER ""d"", u.i);
- #endif
+ sprintf(buf, ""%"" MR_INT_LEAST64_LENGTH_MODIFIER ""d"", u.i);
MR_make_aligned_string_copy(Str, buf);
#else
MR_fatal_error(
More information about the reviews
mailing list