From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>, Kees Cook <keescook@chromium.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse
Date: Mon, 19 Nov 2018 19:34:45 +0900 [thread overview]
Message-ID: <CAK7LNASrWhSbP7=g-iMvEdr48ZLCp+dhgpSUkURC+r1XZiM16Q@mail.gmail.com> (raw)
In-Reply-To: <20181117003109.jdac5rmjdmpmino7@ltop.local>
On Sat, Nov 17, 2018 at 9:33 AM Luc Van Oostenryck
<luc.vanoostenryck@gmail.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
prev parent reply other threads:[~2018-11-19 10:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 6:27 [PATCH v2 1/2] build_bug.h: remove negative-array fallback for BUILD_BUG_ON() Masahiro Yamada
2018-11-16 6:27 ` [PATCH v2 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse Masahiro Yamada
2018-11-16 19:01 ` Kees Cook
2018-11-17 0:31 ` Luc Van Oostenryck
2018-11-19 10:34 ` Masahiro Yamada [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK7LNASrWhSbP7=g-iMvEdr48ZLCp+dhgpSUkURC+r1XZiM16Q@mail.gmail.com' \
--to=yamada.masahiro@socionext.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ndesaulniers@google.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).