This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19808] miss a warning about uninitialized members in constructor
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Sep 2014 14:35:15 +0000
- Subject: [Bug c++/19808] miss a warning about uninitialized members in constructor
- Auto-submitted: auto-generated
- References: <bug-19808-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
--- Comment #23 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #22)
> It could be done specifically for uses in mem-initializers by walking the
> initializer in perform_mem_init to look for any references to members that
> haven't been marked yet.
Great! If I find some time in the following weeks, I will give it a try.
> A more general warning that would cover, say,
>
> X x;
> x.x = x.y;
>
> would need support in the existing back end -Wuninitialized code.
That is PR2972 and I think fixing this one is a prerequisite for fixing that
one. So let's go step by step.