On Thu, Feb 12, 2015 at 8:58 AM, Doug Currie <doug.currie at gmail.com> wrote: > Well, if TERM_VNULL is 0, then the code is truly unreachable, so I wouldn't > call it a compiler bug.
Agreed. But since this usage is so common, the compiler ought to have a switch to turn off warnings for this particular sort of case, which is (exp) & 0. Or perhaps even not warn about this sub-case of unreachable code ever. The problem for the compiler writer is that it's relatively easy to generally detect unreachable code using an AST or intermediate representation, but by then it might be too late to note that this is a use-case that should not be warned about. Nico --