Thread (145 messages) 145 messages, 28 authors, 2021-05-18

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

From: Miguel Ojeda <hidden>
Date: 2020-11-24 23:16:50
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-input, 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, netfilter-devel, op-tee, selinux, target-devel, virtualization, xen-devel

On Tue, Nov 24, 2020 at 11:24 PM Finn Thain [off-list ref] wrote:
These statements are not "missing" unless you presume that code written
before the latest de facto language spec was written should somehow be
held to that spec.
There is no "language spec" the kernel adheres to. Even if it did,
kernel code is not frozen. If an improvement is found, it should be
applied.
If the 'fallthrough' statement is not part of the latest draft spec then
we should ask why not before we embrace it. Being that the kernel still
prefers -std=gnu89 you might want to consider what has prevented
-std=gnu99 or -std=gnu2x etc.
The C standard has nothing to do with this. We use compiler extensions
of several kinds, for many years. Even discounting those extensions,
the kernel is not even conforming to C due to e.g. strict aliasing. I
am not sure what you are trying to argue here.

But, since you insist: yes, the `fallthrough` attribute is in the
current C2x draft.

Cheers,
Miguel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help