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.