From 3944b32e048b4362808ffa847cd2feb7d3525e06 Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Mon, 17 Feb 2020 13:30:15 +0000 Subject: [PATCH] Add back in optimisation disable --- src/libCom/calc/calcPerform.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libCom/calc/calcPerform.c b/src/libCom/calc/calcPerform.c index 4a073c774..40e173b61 100644 --- a/src/libCom/calc/calcPerform.c +++ b/src/libCom/calc/calcPerform.c @@ -25,6 +25,7 @@ #include "postfix.h" #include "postfixPvt.h" + static double calcRandom(void); static int cond_search(const char **ppinst, int match); @@ -32,6 +33,11 @@ static int cond_search(const char **ppinst, int match); #define PI 3.14159265358979323 #endif +/* Turn off global optimization for 64-bit MSVC builds */ +#if defined(_WIN32) && defined(_M_X64) && !defined(_MINGW) +# pragma optimize("g", off) +#endif + /* calcPerform * * Evalutate the postfix expression @@ -392,6 +398,10 @@ epicsShareFunc long return 0; } +#if defined(_WIN32) && defined(_M_X64) && !defined(_MINGW) +# pragma optimize("", on) +#endif + epicsShareFunc long calcArgUsage(const char *pinst, unsigned long *pinputs, unsigned long *pstores) {