linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Chris Forbes <chrisf@ijw.co.nz>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH 1/3] evaluate: warn on identical exprs around '&&'
Date: Sat, 27 Aug 2011 20:33:14 -0700	[thread overview]
Message-ID: <20110828033314.GC20823@leaf> (raw)
In-Reply-To: <CAH3ygc0xmh+w=dRhfHmD5wQ+GbZRcECFf0=GkdAEZ+ZGNeWPhg@mail.gmail.com>

On Sun, Aug 28, 2011 at 02:53:52PM +1200, Chris Forbes wrote:
> I'm concerned about the potential for false-positives [after
> preprocessing is done] when combining a bunch of flags.
> 
> I'll throw together another patch to add &|^ support, run it against a
> bunch of real codebases, and see how crazy it is.

Fair enough.  I'd hope that doesn't happen, but I can imagine some
scenarios based on preprocessor macros that could cause that.  However,
if you find that it mostly works and occasionally produces false
positives, you might consider providing an off-by-default warning option
to enable it.

Ideally, we'd try to take textual equality into account from before the
preprocessing step, but that seems anywhere from difficult to impossible
depending on the degree of macro insanity.

- Josh Triplett

  reply	other threads:[~2011-08-28  3:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27 22:26 [PATCH 1/3] evaluate: warn on identical exprs around '&&' Chris Forbes
2011-08-27 22:26 ` [PATCH 2/3] evaluate: warn on identical exprs around '||' Chris Forbes
2011-08-27 22:26 ` [PATCH 3/3] evaluate: warn on identical exprs on ?: Chris Forbes
2011-08-28  2:46   ` Josh Triplett
2011-08-28  2:51     ` Chris Forbes
2011-08-28  2:50 ` [PATCH 1/3] evaluate: warn on identical exprs around '&&' Josh Triplett
2011-08-28  2:53   ` Chris Forbes
2011-08-28  3:33     ` Josh Triplett [this message]
2011-08-28  2:57   ` Chris Forbes
2011-08-28  3:36     ` Josh Triplett
2011-08-31  0:24 ` Christopher Li
  -- strict thread matches above, loose matches on Subject: below --
2011-08-28  3:14 Chris Forbes
2011-08-29 10:01 ` Jonathan Neuschäfer
2011-08-29 10:25   ` Josh Triplett

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=20110828033314.GC20823@leaf \
    --to=josh@joshtriplett.org \
    --cc=chrisf@ijw.co.nz \
    --cc=linux-sparse@vger.kernel.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).