Manuel López-Ibáñez <lopeziba...@gmail.com> writes: > I authored the patch, HJ just committed it. I cannot think any trivial > way to fix this and I don't have much time to investigate. The PR is > already reopened, so I think the patch should be reverted. Probably we > warn too early now but the above testcase seems specially difficult to > handle.
We may be able to handle it in a manner similar to skip_evaluation in the C++ frontend. When we see a conditional whose test evaluates to a constant, then while processing the false branch we can note that the code will never be executed, and suppress immediate warnings, and set TREE_NO_WARNING to suppress future warnings. Ian