mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Merge pull request #2022 from Xiretza/fallthroughs
Avoid switch fall-through warnings
This commit is contained in:
commit
ebfdf61eb9
5 changed files with 26 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue