From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B53FE393D037; Fri, 14 May 2021 15:55:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B53FE393D037 From: "tuliom at ascii dot art.br" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/100605] -Wimplicit-fallthrough=5 still recognizes comments Date: Fri, 14 May 2021 15:55:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tuliom at ascii dot art.br X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2021 15:55:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100605 --- Comment #1 from Tulio Magno Quites Machado Filho --- Interestingly, all the 3 warnings are reported when using -save-temps: $ gcc -c -save-temps -Wimplicit-fallthrough=3D5 -Werror=3Dimplicit-fallthro= ugh t.c=20 t.c: In function =E2=80=98foo=E2=80=99: t.c:12:9: error: this statement may fall through [-Werror=3Dimplicit-fallthrough=3D] 12 | k =3D 3; | ~~^~~ t.c:14:5: note: here 14 | case 2: | ^~~~ t.c:15:9: error: this statement may fall through [-Werror=3Dimplicit-fallthrough=3D] 15 | k =3D 8; | ~~^~~ t.c:16:5: note: here 16 | case 1: | ^~~~ t.c:17:9: error: this statement may fall through [-Werror=3Dimplicit-fallthrough=3D] 17 | k =3D 16; | ~~^~~~ t.c:18:5: note: here 18 | case 0: | ^~~~ cc1: some warnings being treated as errors=