[Bug c++/19808] miss a warning about uninitialized member usage in member initializer list in constructor
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 2 12:03:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #34 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #33)
> I have a fix for PR2972 and it also correctly handles this case so why is it
> "conceptually different"?
Because to detect uninitialized member usage in member initializer list one
only needs to traverse the member initializer list and keep track of what has
been initialized so far, so there is no need for ME support and there is no
room for false positives/negatives and location info can be perfect.
My understanding is that the consensus has always been to warn in the FE and
avoid ME warnings as much as possible because they tend to be less reliable.
But if you have a patch that works as well as the FE warning, then that is
excellent and I'm happy to see both bugs fixed in one stroke.
More information about the Gcc-bugs
mailing list