[Bug c++/107697] -Wredundant-move misses std::move applied to const objects (instead of const references)

2022-11-15 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107697

--- Comment #2 from Marek Polacek  ---
I guess this is GCC 14 material at this point.

[Bug c++/107697] -Wredundant-move misses std::move applied to const objects (instead of const references)

2022-11-15 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107697

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Keywords||diagnostic
 Ever confirmed|0   |1
 CC||mpolacek at gcc dot gnu.org
   Last reconfirmed||2022-11-15

--- Comment #1 from Marek Polacek  ---
Confirmed.  Currently the code does only:

  /* Also try to warn about redundant std::move in code such as
  T f (const T& t)
  {
return std::move(t);
  }