From 75ac2df8f341cc577656151f405768edd8d3dd66 Mon Sep 17 00:00:00 2001 From: erg Date: Tue, 14 Dec 2010 20:26:16 +0000 Subject: [PATCH] Convert top-level empty action blocks to a trivial action, since empty blocks should not be the same as missing blocks. --- lib/gvpr/compile.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c index a85911fb0..e882c9bfd 100644 --- a/lib/gvpr/compile.c +++ b/lib/gvpr/compile.c @@ -2282,6 +2282,16 @@ static case_stmt *mkStmts(Expr_t * prog, char *src, case_info * sp, cs[i].action = compile(prog, src, sp->action, sp->astart, sfstruse(tmps), 0, INTEGER); if (getErrorErrors()) break; + /* If no error but no compiled action, the input action must + * have been essentially an empty block, which should be + * considered different from a missing block. So, compile a + * trivial block. + */ + if (!cs[i].action) { + sfprintf(tmps, "%s__a%d", lbl, i); + cs[i].action = compile(prog, src, "1", sp->astart, + sfstruse(tmps), 0, INTEGER); + } } sp = sp->next; } -- 2.40.0