]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
docs: Adjust -Wimplicit-fallthrough= documentation for C23
authorJakub Jelinek <jakub@redhat.com>
Tue, 16 Sep 2025 17:25:58 +0000 (19:25 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 16 Sep 2025 17:26:48 +0000 (19:26 +0200)
I've noticed in -Wimplicit-fallthrough= documentation we talk about
[[fallthrough]]; for C++17 but don't mention that it is also standard
way to suppress the warning for C23.

2025-09-16  Jakub Jelinek  <jakub@redhat.com>

* doc/invoke.texi (Wimplicit-fallthrough=): Document that also C23
provides a standard way to suppress the warning with [[fallthrough]];.

gcc/doc/invoke.texi

index 3ffc8d8d4a214ae8781af385be4a0e18187df090..3cf326cc22c35b1c325757c0f3a2aa576e880f13 100644 (file)
@@ -7410,7 +7410,7 @@ switch (cond)
 @end group
 @end smallexample
 
-C++17 provides a standard way to suppress the @option{-Wimplicit-fallthrough}
+C++17 and C23 provide a standard way to suppress the @option{-Wimplicit-fallthrough}
 warning using @code{[[fallthrough]];} instead of the GNU attribute.  In C++11
 or C++14 users can use @code{[[gnu::fallthrough]];}, which is a GNU extension.
 Instead of these attributes, it is also possible to add a fallthrough comment