[Bug c++/48829] g++ no warning initializing a variable using itself
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 30 19:52:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48829
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-30 19:52:08 UTC ---
The string case calls a function (the overloaded operator+ or std::string) so
is actually closer to:
int f(int);
int i = f(i);
which doesn't warn either (although it should do, ideally)
This is similar to PR 48483, maybe even a dup.
More information about the Gcc-bugs
mailing list