qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough


From: Markus Armbruster
Subject: Re: [RFC PATCH 00/78] Strict disable implicit fallthrough
Date: Fri, 13 Oct 2023 14:41:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> writes:

> Hello,
>
> This RFC is inspired by the kernel's move to -Wimplicit-fallthrough=3
> back in 2019.[0]
> We take one step (or two) further by increasing it to 5 which rejects
> fall through comments and requires an attribute statement.
>
> [0]:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a035d552a93b
>
> The line differences are not many, but they spread all over different
> subsystems, architectures and devices. An attempt has been made to split
> them in cohesive patches to aid post-RFC review. Part of the RFC is to
> determine whether these patch divisions needs improvement.
>
> Main questions this RFC poses
> =============================
>
> - Is this change desirable and net-positive.

Unwanted fallthrough is an easy mistake to make, and
-Wimplicit-fallthrough=N helps avoid it.  The question is how far up we
need to push N.  Right now we're at N=2.  Has unwanted fallthrough been
a problem?

> - Should the `fallthrough;` pseudo-keyword be defined like in the Linux
>   kernel, or use glib's G_GNUC_FALLTHROUGH, or keep the already existing
>   QEMU_FALLTHROUGH macro.
> - Should fallthrough comments be removed if they do not include extra
>   information.

Valid questions, but they don't need answers until after picking our N.

[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]