[Bug c++/87150] [8 Regression] move ctor wrongly chosen in return stmt (derived vs. base)
sbergman at redhat dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 21 12:30:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87150
--- Comment #16 from Stephan Bergmann <sbergman at redhat dot com> ---
(In reply to Stephan Bergmann from comment #15)
> I see that with the fix from comment 13 included, the slightly changed source
>
> #include <utility>
> struct S1 { S1(S1 &&); };
> struct S2: S1 {};
> S1 f(S2 s) { return std::move(s); }
>
> causes -Wredundant-move (when that warning is explicitly requested).
Shall I file a separate issue for that?
More information about the Gcc-bugs
mailing list