[Bug c++/18016] Warn about member variables initialized with itself
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Thu Oct 28 03:35:00 GMT 2004
------- Additional Comments From giovannibajo at libero dot it 2004-10-28 03:35 -------
> -Winit-self has nothing to do with this problem really.
> in this case :a(a) is equivalent to this->a = this->a;
Not really. The member-list syntax is used to *initialize* the members, not to
assign a value to them after a default initialization.
I think it makes sense to warn only with -Winit-self.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18016
More information about the Gcc-bugs
mailing list