Re: [PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-22 Thread Marek Polacek via Gcc-patches
On Mon, Aug 22, 2022 at 01:48:34PM +0200, Stephan Bergmann wrote: > On 16/08/2022 14:27, Marek Polacek via Gcc-patches wrote: > > Ping. (The other std::move patches depend on this one.) > > > "c++: Extend -Wp

Re: [PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-22 Thread Stephan Bergmann via Gcc-patches
On 16/08/2022 14:27, Marek Polacek via Gcc-patches wrote: Ping. (The other std::move patches depend on this one.) "c++: Extend -Wpessimizing-move to other contexts" started to cause false positive $ c

Re: [PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-17 Thread Jason Merrill via Gcc-patches
On 8/16/22 14:09, Marek Polacek wrote: On Tue, Aug 16, 2022 at 03:23:18PM -0400, Jason Merrill wrote: On 8/2/22 16:04, Marek Polacek wrote: In my recent patch which enhanced -Wpessimizing-move so that it warns about class prvalues too I said that I'd like to extend it so that it warns in more c

Re: [PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-16 Thread Marek Polacek via Gcc-patches
On Tue, Aug 16, 2022 at 03:23:18PM -0400, Jason Merrill wrote: > On 8/2/22 16:04, Marek Polacek wrote: > > In my recent patch which enhanced -Wpessimizing-move so that it warns > > about class prvalues too I said that I'd like to extend it so that it > > warns in more contexts where a std::move can

Re: [PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-16 Thread Jason Merrill via Gcc-patches
On 8/2/22 16:04, Marek Polacek wrote: In my recent patch which enhanced -Wpessimizing-move so that it warns about class prvalues too I said that I'd like to extend it so that it warns in more contexts where a std::move can prevent copy elision, such as: T t = std::move(T()); T t(std::move(

Re: [PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-16 Thread Marek Polacek via Gcc-patches
Ping. (The other std::move patches depend on this one.) (can_do_rvo_p is renamed to can_elide_copy_prvalue_p in the PR90428 patch.) On Tue, Aug 02, 2022 at 07:04:47PM -0400, Marek Polacek via Gcc-patches wrote: > In my recent patch which enhanced -Wpessimizing-move so that it warns > about class