Re: [PATCH] c++, v2: Fix -Weffc++ in templates [PR98841]

2021-01-28 Thread Jason Merrill via Gcc-patches
On 1/28/21 10:24 AM, Jakub Jelinek wrote: On Thu, Jan 28, 2021 at 10:04:12AM -0500, Jason Merrill wrote: We emit a bogus warning on the following testcase, suggesting that the operator should return *this even when it does that already. The problem is that normally cp_build_indirect_ref_1

[PATCH] c++, v2: Fix -Weffc++ in templates [PR98841]

2021-01-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 28, 2021 at 10:04:12AM -0500, Jason Merrill wrote: > > We emit a bogus warning on the following testcase, suggesting that the > > operator should return *this even when it does that already. > > The problem is that normally cp_build_indirect_ref_1 ensures that *this > > is folded as