aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/yosys.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/yosys.h')
-rw-r--r--kernel/yosys.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/yosys.h b/kernel/yosys.h
index b9b6b24b1..f1646d6bc 100644
--- a/kernel/yosys.h
+++ b/kernel/yosys.h
@@ -145,6 +145,14 @@ extern Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *p
#endif
#if __cplusplus >= 201703L
+# define YS_MAYBE_UNUSED [[maybe_unused]];
+#elif defined(__GNUC__) || defined(__clang__)
+# define YS_MAYBE_UNUSED __attribute__((__unused__))
+#else
+# define YS_MAYBE_UNUSED
+#endif
+
+#if __cplusplus >= 201703L
# define YS_FALLTHROUGH [[fallthrough]];
#elif defined(__clang__)
# define YS_FALLTHROUGH [[clang::fallthrough]];