gcc 7 has added a default fallthrough warning (-Wimplicit-fallthrough enabled by -Wextra).
To suppress this warning C++17 provides a standard way: the [[fallthrough]]; attribute.
In C++11 / C++14, with gcc, it's also possible to add a //-fallthrough comment to silence the warning. This is the current approach but the C++17 attribute specifier sequence is a better option.
gcc 7
has added a default fallthrough warning (-Wimplicit-fallthrough
enabled by-Wextra
).To suppress this warning C++17 provides a standard way: the
[[fallthrough]];
attribute.In C++11 / C++14, with gcc, it's also possible to add a
//-fallthrough
comment to silence the warning. This is the current approach but the C++17 attribute specifier sequence is a better option.