← Commit list

a1698a15d

Denys Vlasenko
Denys Vlasenko
2019-01-08
SUCCESS Duration: 152s

Subject

bc: remove "empty expression" check/message, parsing fails in these cases anyway

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/bc.c+4 -3
@@ -4780,9 +4780,10 @@ static BC_STATUS zbc_parse_expr(uint8_t flags)
break;
case BC_LEX_RPAREN:
dbg_lex("%s:%d LEX_RPAREN", __func__, __LINE__);
- if (p->lex_last == BC_LEX_LPAREN) {
- RETURN_STATUS(bc_error("empty expression"));
- }
+//why?
+// if (p->lex_last == BC_LEX_LPAREN) {
+// RETURN_STATUS(bc_error_at("empty expression"));
+// }
if (bin_last || prev == XC_INST_BOOL_NOT)
RETURN_STATUS(bc_error_bad_expression());
if (nparens == 0) {