mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Make it work on all
This commit is contained in:
parent
cbb6887ac8
commit
d5de2a0cdb
|
@ -147,9 +147,7 @@ extern Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *p
|
||||||
# define YS_ATTRIBUTE(...)
|
# define YS_ATTRIBUTE(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __cplusplus >= 201703L
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
# define YS_MAYBE_UNUSED [[maybe_unused]]
|
|
||||||
#elif defined(__GNUC__) || defined(__clang__)
|
|
||||||
# define YS_MAYBE_UNUSED __attribute__((__unused__))
|
# define YS_MAYBE_UNUSED __attribute__((__unused__))
|
||||||
#else
|
#else
|
||||||
# define YS_MAYBE_UNUSED
|
# define YS_MAYBE_UNUSED
|
||||||
|
|
|
@ -679,14 +679,16 @@ with open(outfile, "w") as f:
|
||||||
print("#undef subpattern", file=f)
|
print("#undef subpattern", file=f)
|
||||||
|
|
||||||
print("", file=f)
|
print("", file=f)
|
||||||
print("YS_MAYBE_UNUSED rollback_label:;", file=f)
|
print("rollback_label:", file=f)
|
||||||
|
print(" YS_MAYBE_UNUSED;", file=f)
|
||||||
|
|
||||||
if len(block["fcode"]):
|
if len(block["fcode"]):
|
||||||
print("#define accept do { accept_cnt++; on_accept(); } while(0)", file=f)
|
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)
|
print("#define finish do { rollback = -1; goto finish_label; } while(0)", file=f)
|
||||||
for line in block["fcode"]:
|
for line in block["fcode"]:
|
||||||
print(" " + line, file=f)
|
print(" " + line, file=f)
|
||||||
print("YS_MAYBE_UNUSED finish_label:;", file=f)
|
print("finish_label:", file=f)
|
||||||
|
print(" YS_MAYBE_UNUSED;", file=f)
|
||||||
print("#undef accept", file=f)
|
print("#undef accept", file=f)
|
||||||
print("#undef finish", file=f)
|
print("#undef finish", file=f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue