3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-06 03:10:26 +00:00

Add YS_FALLTHROUGH macro to mark case fall-through

C++17 introduced [[fallthrough]], GCC and clang had their own vendored
attributes before that. MSVC doesn't seem to have such a warning at all.
This commit is contained in:
Xiretza 2020-05-04 21:12:30 +02:00
parent a299e606f8
commit 695150b037
No known key found for this signature in database
GPG key ID: E51A6C6A1EB378ED
5 changed files with 23 additions and 6 deletions

View file

@ -91,7 +91,7 @@ std::string AstNode::process_format_str(const std::string &sformat, int next_arg
case 'D':
if (got_len)
goto unsupported_format;
/* fall through */
YS_FALLTHROUGH
case 'x':
case 'X':
if (next_arg >= GetSize(children))