This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Fix some -Wused-but-set-variable regressions (PR c++/82728, PR c++/82799, PR c++/83690)


On Wed, Jan 10, 2018 at 11:59 AM, Jason Merrill <jason@redhat.com> wrote:
> On Wed, Jan 10, 2018 at 11:56 AM, Jakub Jelinek <jakub@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 <jakub@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.

Fixed thus:

Attachment: 82728.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]