[Bug c++/67906] Missing warning about std::move without effect
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 24 09:52:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67906
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2017-08-24
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Could you please provide a complete self-contained example? The snippet you
posted looks like it's missing some declarations:
$ /usr/local/bin/g++ -c 67906.cc
67906.cc:1:7: error: ‘Frame’ does not name a type
const Frame& x = stack.top();
^~~~~
67906.cc:2:1: error: ‘Value’ does not name a type
Value y = std::move(x.value); // x.value - non-mutable
^~~~~
$
Anyways, bug 81159 is related, but that's about a different misuse of
std::move, so I'll keep the 2 separate.
Oh, and also "-Wno-effect" would probably be a bad name for the option, since
"-Wno-" is reserved for negative versions of warnings. i.e., is "-Wno-effect"
the negative of "-Weffect"? That seems wrong. Or is it already in the positive,
in which case the negative is "-Wno-no-effect"? That would seem redundant.
More information about the Gcc-bugs
mailing list