morinim / vita

Vita - Genetic Programming Framework
Mozilla Public License 2.0
35 stars 6 forks source link

Use the standard [[fallthrough]] attribute #14

Closed morinim closed 4 years ago

morinim commented 7 years ago

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.