From: Josh Triplett <josh@joshtriplett.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: Unreachable code diagnostic
Date: Fri, 24 Feb 2017 12:43:56 -0800 [thread overview]
Message-ID: <20170224204356.hhfvnd6ballotrqu@x> (raw)
In-Reply-To: <20170224201152.7skvolezq4j75su6@macpro.local>
On Fri, Feb 24, 2017 at 09:11:53PM +0100, Luc Van Oostenryck wrote:
> I'm not very sure what are the cases in wich Matthew is really
> interested but I suppose that, even after preprocessing and
> elimination of if (0) {...}, a return statement in the middle
> of a compound statement is very often unintentional.
> That should be easy to check.
By "middle of a compound statement", you mean an unconditional return
followed by more code? Yes, that seems like something reasonable to
statically check.
- Josh Triplett
next prev parent reply other threads:[~2017-02-24 20:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 18:07 Unreachable code diagnostic Matthew Wilcox
2017-02-24 18:33 ` Linus Torvalds
2017-02-24 20:11 ` Luc Van Oostenryck
2017-02-24 20:43 ` Josh Triplett [this message]
2017-02-24 20:47 ` Luc Van Oostenryck
2017-02-24 18:57 ` Josh Triplett
2017-02-24 19:56 ` Luc Van Oostenryck
2017-02-24 21:05 ` Matthew Wilcox
2017-02-24 19:26 ` Dan Carpenter
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=20170224204356.hhfvnd6ballotrqu@x \
--to=josh@joshtriplett.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.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).