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:
Alexandre Duret-Lutz 2016-10-07 17:25:09 +02:00
parent fa80571d44
commit a5d6aa2533
14 changed files with 85 additions and 27 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013, 2015 Laboratoire de Recherche et Developpement de
// l'Epita (LRDE)
// Copyright (C) 2012, 2013, 2015, 2016 Laboratoire de Recherche et
// Developpement de l'Epita (LRDE)
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
@ -67,6 +67,7 @@ namespace spot
case '{':
case '}':
os << '\\';
SPOT_FALLTHROUGH;
default:
os << i;
break;
@ -149,7 +150,7 @@ namespace spot
case '"':
case '\\':
os << '\\';
// fall through
SPOT_FALLTHROUGH;
default:
os << *str++;
break;