[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <919be4e2-a0a5-abaa-fd7c-abed244a7393@embeddedor.com>
Date: Sat, 16 Mar 2019 16:42:27 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Shawn Landden <shawn@....icu>, linux-kernel@...r.kernel.org
Cc: Joe Perches <joe@...ches.com>, Andy Whitcroft <apw@...onical.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] Use fall-through attribute rather than magic comments
Shawn,
On 3/15/19 10:38 PM, 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.)
>
This is not the first time we discuss this topic. Please, read the archive.
We are going to complete the ongoing work first and, after that, I personally
will consider applying this kind of tree-wide change, or any other that may
serve to the same purpose, to my tree. At this moment this change will only
create confusion and potentially bring a halt to the main idea behind all this,
which is to enable -Wimplicit-fallthrough. There are only ~100 of these warnings
left in linux-next.
Having said that, please, cultivate the practice of showing every code you touch
to a compiler first before proposing any patches. Otherwise, your opinions and
ideas won't be that popular.
Also, if your intention was to do a tree-wide change to replace all the existing
fall-through comments, you failed to take into account all the info contained
in the article you mention, which by the way is incomplete.
Thanks
--
Gustavo
Powered by blists - more mailing lists