------- Comment #10 from manu at gcc dot gnu dot org 2010-06-03 08:47 ------- (In reply to comment #9) > I've been experimenting with this patch, which warns if there is a missing > mem-initializer for a scalar. > > It gives a false positive for cases were the member is assigned to in the > constructor body, or otherwise initialized before use, but it's a start, and > has already helped me find some missing mem-initializers in real code.
Nice but I am afraid there may be too many false positives. And what is different between this and the -Weffc++ warning given just below it? > > + case OPT_Wmeminit: > + warn_meminit = value; > + break; > + You do not need this. This is handled automatically when you defined Var in the opt files. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|gdr at gcc dot gnu dot org |unassigned at gcc dot gnu | |dot org Status|ASSIGNED |NEW http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2972