https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70647
--- Comment #4 from Matt Godbolt ---
Agreed re: cast/FE.
I couldn't quite get your example to fail as the "o" parameter is unusued
(which would be a good clue!
#include // for std::move
struct B {
int a; int b;
B(B &&o)
: a(b),
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70647
--- Comment #3 from Manuel López-Ibáñez ---
> --- Comment #2 from Matt Godbolt ---
> Thanks Manuel. Interestingly this does elicit a warning:
>
> struct B {
> int a; int b;
> B(B &&o)
> : a(static_cast(a)),
> b(std::move(o.b)) {}
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70647
--- Comment #2 from Matt Godbolt ---
Thanks Manuel. Interestingly this does elicit a warning:
struct B {
int a; int b;
B(B &&o)
: a(static_cast(a)),
b(std::move(o.b)) {}
};
but this does not:
struct B {
int a; int b;
B(B
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70647
Manuel López-Ibáñez changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
CC|