Thread (72 messages) 72 messages, 22 authors, 2020-12-08

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

From: Nick Desaulniers <hidden>
Date: 2020-11-25 22:09:45
Also in: amd-gfx, bridge, ceph-devel, dm-devel, dri-devel, intel-gfx, intel-wired-lan, keyrings, linux-acpi, linux-arm-msm, linux-block, linux-can, linux-cifs, linux-crypto, linux-ext4, linux-fbdev, linux-gpio, linux-hardening, linux-hwmon, linux-i3c, linux-ide, linux-iio, linux-integrity, linux-media, linux-mediatek, linux-mm, linux-mmc, linux-nfs, linux-rdma, linux-renesas-soc, linux-scsi, linux-sctp, linux-security-module, linux-usb, linux-watchdog, linux-wireless, lkml, netdev, netfilter-devel, op-tee, selinux, target-devel, virtualization, xen-devel

On Wed, Nov 25, 2020 at 1:33 PM Finn Thain [off-list ref] wrote:
Or do you think that a codebase can somehow satisfy multiple checkers and
their divergent interpretations of the language spec?
Have we found any cases yet that are divergent? I don't think so.  It
sounds to me like GCC's cases it warns for is a subset of Clang's.
Having additional coverage with Clang then should ensure coverage for
both.
quoted
This is not a shiny new warning; it's already on for GCC and has existed
in both compilers for multiple releases.
Perhaps you're referring to the compiler feature that lead to the
ill-fated, tree-wide /* fallthrough */ patch series.

When the ink dries on the C23 language spec and the implementations figure
out how to interpret it then sure, enforce the warning for new code -- the
cost/benefit analysis is straight forward. However, the case for patching
existing mature code is another story.
I don't think we need to wait for the ink to dry on the C23 language
spec to understand that implicit fallthrough is an obvious defect of
the C language.  While the kernel is a mature codebase, it's not
immune to bugs.  And its maturity has yet to slow its rapid pace of
development.
-- 
Thanks,
~Nick Desaulniers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help