On Mon, Oct 21, 2019 at 11:02:26PM -0300, Marcos Paulo de Souza wrote: > From: Marcos Paulo de Souza <mpdeso...@suse.com> > > While compiling btrfs-progs using clang I found an issue using > __attribute__(fallthrough), which does not seems to work in clang. > > To solve this issue, the code was changed to use /* fallthrough */, which is > the > same notation adopted by linux kernel.
I'd suggest to follow what kernel does, IIRC there's some whole-tree cleanup of all the fall through statements with a unified conversion to the right(tm) annotation. > Once these places were changed, -Wimplicit-fallthrough was set in Makefile, to > avoid further implicit-fallthrough cases being added in the future. That would be good to add by default, but I'm a bit worried about the differences between compilers and that we'd have to switch the annotations again once the attribute support lands. Maybe that's not a big deal.