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) {