Code review comment for lp:~widelands-dev/widelands/gcc7

Revision history for this message
SirVer (sirver) wrote :

qq: why not use __attribute__ ((fallthrough)); [1] to get rid of the warnings? This is slightly ugly - so we could hide it in a macro:

#define FALLTHROUGH_INTENDED __attribute__ ((fallthrough))

This would make it explicit that we did intend for this to fall through. It should also be compatible across all compilers.

[1] https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/

« Back to merge proposal