backward compatible incomplete ? CALC expression

This commit is contained in:
2021-08-19 11:24:25 +02:00
parent 9a17604e70
commit ddad6e7b6f
2 changed files with 5 additions and 3 deletions

View File

@@ -428,10 +428,12 @@ LIBCOM_API long
pstacktop--;
}
/*
if (cond_count != 0) {
*perror = CALC_ERR_CONDITIONAL;
goto bad;
}
*/
if (runtime_depth > 1) {
*perror = CALC_ERR_TOOMANY;
goto bad;

View File

@@ -298,7 +298,7 @@ MAIN(epicsCalcTest)
const double a=1.0, b=2.0, c=3.0, d=4.0, e=5.0, f=6.0,
g=7.0, h=8.0, i=9.0, j=10.0, k=11.0, l=12.0;
testPlan(630);
testPlan(/*630*/628);
/* LITERAL_OPERAND elements */
testExpr(0);
@@ -945,8 +945,8 @@ MAIN(epicsCalcTest)
testBadExpr("MAX()", CALC_ERR_SYNTAX);
testBadExpr("MAX(A,)", CALC_ERR_SYNTAX);
testBadExpr("MAX(A,B,)", CALC_ERR_SYNTAX);
testBadExpr("1?", CALC_ERR_CONDITIONAL);
testBadExpr("1?1", CALC_ERR_CONDITIONAL);
// testBadExpr("1?", CALC_ERR_CONDITIONAL);
// testBadExpr("1?1", CALC_ERR_CONDITIONAL);
testBadExpr(":1", CALC_ERR_SYNTAX);
// Bit manipulations wrt bit 31 (bug lp:1514520)