introduce SPOT_FALLTHROUGH to cope with -Wimplicit-fallthrough
* NEWS: Mention the fix. * HACKING: Mention the new macro. * spot/misc/common.hh (SPOT_FALLTHROUGH): Add the macro. * bin/randltl.cc, spot/misc/escape.cc, spot/tl/mutation.cc, spot/tl/print.cc, spot/tl/simplify.hh, spot/tl/snf.cc, spot/twa/acc.cc, spot/twaalgos/ltl2taa.cc, spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/sepsets.cc, spot/twaalgos/translate.cc: Use it.
This commit is contained in:
parent
fa80571d44
commit
a5d6aa2533
14 changed files with 85 additions and 27 deletions
|
|
@ -77,6 +77,7 @@ namespace spot
|
|||
{
|
||||
case acc_cond::acc_op::And:
|
||||
op = html ? " & " : " & ";
|
||||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::Or:
|
||||
{
|
||||
unsigned sub = pos - w.size;
|
||||
|
|
@ -99,6 +100,7 @@ namespace spot
|
|||
break;
|
||||
case acc_cond::acc_op::InfNeg:
|
||||
negated = "!";
|
||||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::Inf:
|
||||
{
|
||||
auto a = code[pos - 1].mark.id;
|
||||
|
|
@ -134,6 +136,7 @@ namespace spot
|
|||
break;
|
||||
case acc_cond::acc_op::FinNeg:
|
||||
negated = "!";
|
||||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::Fin:
|
||||
{
|
||||
auto a = code[pos - 1].mark.id;
|
||||
|
|
@ -347,6 +350,7 @@ namespace spot
|
|||
pos -= 2;
|
||||
break;
|
||||
}
|
||||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::FinNeg:
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1017,7 +1021,7 @@ namespace spot
|
|||
case acc_cond::acc_op::FinNeg:
|
||||
if (pos[-1].mark.count() > 1 && pos > and_scope)
|
||||
return false;
|
||||
/* fall through */
|
||||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::Inf:
|
||||
case acc_cond::acc_op::InfNeg:
|
||||
pos -= 2;
|
||||
|
|
@ -1050,7 +1054,7 @@ namespace spot
|
|||
case acc_cond::acc_op::InfNeg:
|
||||
if (pos[-1].mark.count() > 1 && pos > or_scope)
|
||||
return false;
|
||||
/* fall through */
|
||||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::Fin:
|
||||
case acc_cond::acc_op::FinNeg:
|
||||
pos -= 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue