From 76ba74256314e04144095bf85e6e1ca21d3991bc Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 28 Feb 2018 16:54:12 +0100 Subject: [PATCH] allow unterminated conditionals in CALC --- src/libCom/calc/postfix.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/libCom/calc/postfix.c b/src/libCom/calc/postfix.c index 025cfc975..5dd9aa75b 100644 --- a/src/libCom/calc/postfix.c +++ b/src/libCom/calc/postfix.c @@ -421,10 +421,12 @@ epicsShareFunc long pstacktop--; } - if (cond_count != 0) { - *perror = CALC_ERR_CONDITIONAL; - goto bad; - } +/* + * if (cond_count != 0) { + * *perror = CALC_ERR_CONDITIONAL; + * goto bad; + * } + */ if (runtime_depth > 1) { *perror = CALC_ERR_TOOMANY; goto bad; @@ -468,10 +470,12 @@ epicsShareFunc long } *pout = END_EXPRESSION; - if (cond_count != 0) { - *perror = CALC_ERR_CONDITIONAL; - goto bad; - } +/* + * if (cond_count != 0) { + * *perror = CALC_ERR_CONDITIONAL; + * goto bad; + * } + */ if (operand_needed || runtime_depth != 1) { *perror = CALC_ERR_INCOMPLETE; goto bad;