diff options
author | whitequark <whitequark@whitequark.org> | 2020-05-08 05:30:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-08 05:30:32 +0000 |
commit | ebfdf61eb9703a16f949470f98509fdb405adf8f (patch) | |
tree | c5d9c3b6dd337630c50f75fb98a87f6897ef6a9c /kernel | |
parent | 5b779f7f4ef0bf2c4ad3a412da24fad30b078626 (diff) | |
parent | d86fc791f9016fa6dafa7af1758ef301136e9eec (diff) | |
download | yosys-ebfdf61eb9703a16f949470f98509fdb405adf8f.tar.gz yosys-ebfdf61eb9703a16f949470f98509fdb405adf8f.tar.bz2 yosys-ebfdf61eb9703a16f949470f98509fdb405adf8f.zip |
Merge pull request #2022 from Xiretza/fallthroughs
Avoid switch fall-through warnings
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/yosys.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/yosys.h b/kernel/yosys.h index af1e376b1..62f76a63f 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -155,6 +155,16 @@ extern Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *p # define YS_NORETURN #endif +#if __cplusplus >= 201703L +# define YS_FALLTHROUGH [[fallthrough]]; +#elif defined(__GNUC__) +# define YS_FALLTHROUGH [[gnu::fallthrough]]; +#elif defined(__clang__) +# define YS_FALLTHROUGH [[clang::fallthrough]]; +#else +# define YS_FALLTHROUGH +#endif + YOSYS_NAMESPACE_BEGIN // Note: All headers included in hashlib.h must be included |