Re: [PATCH] c++: Implement -Wself-move warning [PR81159]

2022-08-15 Thread Jason Merrill via Gcc-patches
On 8/9/22 09:37, Marek Polacek wrote: About 5 years ago we got a request to implement -Wself-move, which warns about useless moves like this: int x; x = std::move (x); This patch implements that warning. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? PR c++/81159

[PATCH] c++: Implement -Wself-move warning [PR81159]

2022-08-09 Thread Marek Polacek via Gcc-patches
About 5 years ago we got a request to implement -Wself-move, which warns about useless moves like this: int x; x = std::move (x); This patch implements that warning. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? PR c++/81159 gcc/c-family/ChangeLog: * c.opt (