From: Miodrag Milanovic Date: Fri, 5 Nov 2021 09:36:15 +0000 (+0100) Subject: Correct way of setting maybe_unsused on labels X-Git-Tag: yosys-0.11~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cbb6887ac846dbbaa420253a9f3656bd3b6bd92d;p=yosys.git Correct way of setting maybe_unsused on labels --- diff --git a/passes/pmgen/pmgen.py b/passes/pmgen/pmgen.py index 6e2fabeeb..c599d31a6 100644 --- a/passes/pmgen/pmgen.py +++ b/passes/pmgen/pmgen.py @@ -679,16 +679,14 @@ with open(outfile, "w") as f: print("#undef subpattern", file=f) print("", file=f) - print("rollback_label:", file=f) - print(" YS_MAYBE_UNUSED;", file=f) + print("YS_MAYBE_UNUSED rollback_label:;", file=f) if len(block["fcode"]): print("#define accept do { accept_cnt++; on_accept(); } while(0)", file=f) print("#define finish do { rollback = -1; goto finish_label; } while(0)", file=f) for line in block["fcode"]: print(" " + line, file=f) - print("finish_label:", file=f) - print(" YS_MAYBE_UNUSED;", file=f) + print("YS_MAYBE_UNUSED finish_label:;", file=f) print("#undef accept", file=f) print("#undef finish", file=f)