aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2021-11-05 10:36:15 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2021-11-05 10:36:15 +0100
commitcbb6887ac846dbbaa420253a9f3656bd3b6bd92d (patch)
tree1493953430595402ced3d97fbfb738a8e549e144
parent051b234df66c242c7a81b0f37d53c0637649ddd1 (diff)
downloadyosys-cbb6887ac846dbbaa420253a9f3656bd3b6bd92d.tar.gz
yosys-cbb6887ac846dbbaa420253a9f3656bd3b6bd92d.tar.bz2
yosys-cbb6887ac846dbbaa420253a9f3656bd3b6bd92d.zip
Correct way of setting maybe_unsused on labels
-rw-r--r--passes/pmgen/pmgen.py6
1 files changed, 2 insertions, 4 deletions
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)