From 38f13eb0ad7b03ce2709bb7eb1e81788c69e4dd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 2 Oct 2018 18:22:32 +0200
Subject: [PATCH] Remove nonsensical check on MS Visual C++ version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The check is done at the time the preprocessor is compiled, but it ought to be
done at the time when the C source file generated by the preprocessor is compiled…

Anyways, it is probably irrelevant now, since MSVC has supported
acosh/asinh/atanh for a long time now.
---
 src/ModFile.cc | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/src/ModFile.cc b/src/ModFile.cc
index 37222db1..6fd3d547 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -955,30 +955,6 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
                 << "  error('DYNARE: Can''t find bytecode DLL. Please compile it or remove the ''bytecode'' option.')" << endl
                 << "end" << endl;
 
-#if defined(_WIN32) || defined(__CYGWIN32__)
-# if (defined(_MSC_VER) && _MSC_VER < 1700)
-  // If using USE_DLL with MSVC 10.0 or earlier, check that the user didn't use a function not supported by the compiler (because MSVC <= 10.0 doesn't comply with C99 standard)
-  if (use_dll && msvc)
-    {
-      if (dynamic_model.isUnaryOpUsed(UnaryOpcode::acosh))
-        {
-          cerr << "ERROR: acosh() function is not supported with USE_DLL option and older MSVC compilers; use Cygwin, MinGW or upgrade your MSVC compiler to 11.0 (2012) or later." << endl;
-          exit(EXIT_FAILURE);
-        }
-      if (dynamic_model.isUnaryOpUsed(UnaryOpcode::asinh))
-        {
-          cerr << "ERROR: asinh() function is not supported with USE_DLL option and older MSVC compilers; use Cygwin, MinGW or upgrade your MSVC compiler to 11.0 (2012) or later." << endl;
-          exit(EXIT_FAILURE);
-        }
-      if (dynamic_model.isUnaryOpUsed(UnaryOpcode::atanh))
-        {
-          cerr << "ERROR: atanh() function is not supported with USE_DLL option and older MSVC compilers; use Cygwin, MinGW or upgrade your MSVC compiler to 11.0 (2012) or later." << endl;
-          exit(EXIT_FAILURE);
-        }
-    }
-# endif
-#endif
-
   // Compile the dynamic MEX file for use_dll option
   // When check_model_changes is true, don't force compile if MEX is fresher than source
   if (use_dll)
-- 
GitLab