On Wed, Jan 10, 2018 at 11:56 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Jan 10, 2018 at 11:52:16AM -0500, Jason Merrill wrote: >> On Fri, Jan 5, 2018 at 5:14 PM, Jakub Jelinek <ja...@redhat.com> wrote: >> > Jason's recent change removed a mark_rvalue_use call from constant_value_1, >> > which unfortunately regressed quite a few cases where >> > -Wunused-but-set-variable now has false positives. >> >> > The easiest fix seems to be just deal with the -Wunused-but-set-variable >> > issue at that point. >> >> Hmm, we ought to have called mark_rvalue_use before we get here. I'm >> concerned that these issues indicate that lambda captures won't work >> in the situations in the testcase, since we rely on mark_rvalue_use to >> look through them. > > Unless you have ideas where to put those mark_rvalue_use calls, I'll defer > these PRs to you then, this was just an attempt for an easy way out of it > for the warning. At least the testcases should be usable for future patch.
Makes sense, thanks. Jason