[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNASrWhSbP7=g-iMvEdr48ZLCp+dhgpSUkURC+r1XZiM16Q@mail.gmail.com>
Date: Mon, 19 Nov 2018 19:34:45 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Kees Cook <keescook@...omium.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs
for sparse
On Sat, Nov 17, 2018 at 9:33 AM Luc Van Oostenryck
<luc.vanoostenryck@...il.com> wrote:
>
> On Fri, Nov 16, 2018 at 03:27:25PM +0900, Masahiro Yamada wrote:
> > The introduction of these dummy BUILD_BUG_ON stubs dates back to
> > commit 903c0c7cdc21 ("sparse: define dummy BUILD_BUG_ON definition
> > for sparse"). At that time, BUILD_BUG_ON() was implemented with the
> > negative array trick, which Sparse complains about even if the
> > condition can be optimized and evaluated to 0 at compile-time.
>
> OK, but from what I understand, the motivation for commit 903c0c7cdc21
> was not to avoid false warnings but to avoid having twice the same
> warnings: "... So it causes sparse to detect an error too. This
> reduces sparse's usefulness.").
In fact, Sparse was producing false positives.
I mentioned this in the commit message of v3.
> I'm not opposed to this patch (on the contrary, I think it's better
> to have exactly the same code for GCC than for sparse) but I think
> that your commit message need to be adjusted.
>
> Kind regards,
> -- Luc
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists