http://d.puremagic.com/issues/show_bug.cgi?id=7232


Kenji Hara <k.hara...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #1 from Kenji Hara <k.hara...@gmail.com> 2012-01-06 08:51:01 PST ---
https://github.com/D-Programming-Language/dmd/pull/610

In addArticle function, dmd translates the body code like follows:

try {
  return true;
}
catch (Throwable __o) {
  return false;
  throw __o;  // #1 rethrow catched exception object
}

The "statement is not reachable" warning is caused by line #1.

After my patch, the translation result would change like follows:

try {
  return true;
}
catch (Throwable __o) {
  return false;   // this statement never fall through next.
                  // so next unreachable rethrowing is implicitly removed.
}

Finally, original warning would never be generated.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to