Should unreachable code be considered an error?

Bernard Helyer b.helyer at gmail.com
Fri Aug 19 23:28:43 PDT 2011


On Sat, 20 Aug 2011 01:42:56 +0100, Stewart Gordon wrote:

> So essentially you're looking to catch cases where, if you consider the
> function as a flow chart, there is no chain of arrows from the start of
> the function to the statement in question.  That should be
> straightforward.  But you're not worrying about catching cases where
> some arrow would never be followed.  Have I got that right?

Pretty much, minor correction on the last part -- an arrow means that the 
compiler considers it a possibility, so it's not considered in so far as 
the data structure doesn't make the distinction.


More information about the Digitalmars-d mailing list