Re: [PATCH] Use fall-through attribute rather than magic comments
From: Joe Perches
Date: Sat Mar 16 2019 - 04:08:11 EST
On Fri, 2019-03-15 at 21:38 -0600, Shawn Landden wrote:
> The -Wimplicit-fallthrough warning recognizes magic comments
> https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
> It is my opinion that magic comments are a bad idea. Comments should not
> change the interpretation (even regarding errors) of C code.
> (It also happens to break distcc as distcc compiles pre-processed .i files.)
>
> I am aware this can cause some merge pain.
>
> Also, if my style is OK, then needs some changes to checkpatch.pl. (CCed)
I think it's a pretty good idea
https://lkml.org/lkml/2017/2/10/485
It's generally better to add a patch first to the include
file and then conversion patches by subsystem instead of one
gigantic patch spanning multiple subsystems.
Or send a script that does the conversion.