aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast/genrtlil.cc
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2020-05-04 21:12:30 +0200
committerXiretza <xiretza@xiretza.xyz>2020-05-07 13:39:34 +0200
commit695150b0378528233837348b598033b137b8a949 (patch)
treedf1720c84ac61299984dde8a0c0ac3bf52c99924 /frontends/ast/genrtlil.cc
parenta299e606f864942c7edf90c4ad3998f4f4a346cf (diff)
downloadyosys-695150b0378528233837348b598033b137b8a949.tar.gz
yosys-695150b0378528233837348b598033b137b8a949.tar.bz2
yosys-695150b0378528233837348b598033b137b8a949.zip
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.
Diffstat (limited to 'frontends/ast/genrtlil.cc')
-rw-r--r--frontends/ast/genrtlil.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc
index 996762715..b5cdf270f 100644
--- a/frontends/ast/genrtlil.cc
+++ b/frontends/ast/genrtlil.cc
@@ -923,7 +923,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
}
break;
}
- /* fall through */
+ YS_FALLTHROUGH
// everything should have been handled above -> print error if not.
default:
@@ -1019,7 +1019,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
if (GetSize(children) >= 1 && children[0]->type == AST_CONSTANT) {
current_module->parameter_default_values[str] = children[0]->asParaConst();
}
- /* fall through */
+ YS_FALLTHROUGH
case AST_LOCALPARAM:
if (flag_pwires)
{
@@ -1807,7 +1807,8 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
is_signed = sign_hint;
return SigSpec(wire);
}
- } /* fall through */
+ }
+ YS_FALLTHROUGH
// everything should have been handled above -> print error if not.
default: