← Commit list

d279d809a

Denys Vlasenko
Denys Vlasenko
2018-12-24
SUCCESS Duration: 152s

Subject

bc: fix "bc -s" only warning on "define f()", not exiting

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+3 -1
@@ -4426,8 +4426,10 @@ static BC_STATUS zbc_parse_funcdef(BcParse *p)
s = zbc_lex_next(&p->l);
if (s) RETURN_STATUS(s);
- if (p->l.t.t != BC_LEX_LBRACE)
+ if (p->l.t.t != BC_LEX_LBRACE) {
s = zbc_POSIX_requires("the left brace be on the same line as the function header");
+ if (s) RETURN_STATUS(s);
+ }
// Prevent "define z()<newline>" from being interpreted as function with empty stmt as body
s = zbc_lex_skip_if_at_NLINE(&p->l);