aboutsummaryrefslogtreecommitdiffstats
path: root/backends/firrtl
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 /backends/firrtl
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 'backends/firrtl')
-rw-r--r--backends/firrtl/firrtl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/firrtl/firrtl.cc b/backends/firrtl/firrtl.cc
index 40d05a036..f6dae1d8c 100644
--- a/backends/firrtl/firrtl.cc
+++ b/backends/firrtl/firrtl.cc
@@ -343,7 +343,7 @@ struct FirrtlWorker
switch (dir) {
case FD_INOUT:
log_warning("Instance port connection %s.%s is INOUT; treating as OUT\n", cell_type.c_str(), log_signal(it->second));
- /* FALLTHRU */
+ YS_FALLTHROUGH
case FD_OUT:
sourceExpr = firstName;
sinkExpr = secondExpr;
@@ -351,7 +351,7 @@ struct FirrtlWorker
break;
case FD_NODIRECTION:
log_warning("Instance port connection %s.%s is NODIRECTION; treating as IN\n", cell_type.c_str(), log_signal(it->second));
- /* FALLTHRU */
+ YS_FALLTHROUGH
case FD_IN:
sourceExpr = secondExpr;
sinkExpr = firstName;