https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100605
--- Comment #1 from Tulio Magno Quites Machado Filho <tuliom at ascii dot art.br> --- Interestingly, all the 3 warnings are reported when using -save-temps: $ gcc -c -save-temps -Wimplicit-fallthrough=5 -Werror=implicit-fallthrough t.c t.c: In function ‘foo’: t.c:12:9: error: this statement may fall through [-Werror=implicit-fallthrough=] 12 | k = 3; | ~~^~~ t.c:14:5: note: here 14 | case 2: | ^~~~ t.c:15:9: error: this statement may fall through [-Werror=implicit-fallthrough=] 15 | k = 8; | ~~^~~ t.c:16:5: note: here 16 | case 1: | ^~~~ t.c:17:9: error: this statement may fall through [-Werror=implicit-fallthrough=] 17 | k = 16; | ~~^~~~ t.c:18:5: note: here 18 | case 0: | ^~~~ cc1: some warnings being treated as errors