[Bug c++/81431] add warning for missing initializers in constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81431 --- Comment #4 from Eric Gallager --- (In reply to Jonathan Wakely from comment #3) > I would prefer to see -Weffc++ deprecated and removed, so tying this valid > request to -Weffc++ might see it die. If bug 16166 is fixed, then this request would be tied to whichever suboption the warning is moved to, rather than to -Weffc++ itself. Splitting -Weffc++ up could be a step to deprecating/removing it.
[Bug c++/81431] add warning for missing initializers in constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81431 Jonathan Wakely changed: What|Removed |Added Status|RESOLVED|NEW Last reconfirmed||2017-08-22 See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=16166 Resolution|DUPLICATE |--- Ever confirmed|0 |1 --- Comment #3 from Jonathan Wakely --- I would prefer to see -Weffc++ deprecated and removed, so tying this valid request to -Weffc++ might see it die.
[Bug c++/81431] add warning for missing initializers in constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81431 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||egallager at gcc dot gnu.org Resolution|--- |DUPLICATE --- Comment #2 from Eric Gallager --- (In reply to Tom Tromey from comment #0) > I would like gcc to emit a warning when a constructor does not > initialize a POD member; and in particular I'd like this not to > be tied to -Wuninitialized. > > Having a warning like this is good for robustness -- it avoids > situations where one forgets to initialize a scalar or the like. > > I realize -Wuninitialized will do this, but that can be a difficult > warning to enable for an existing code base, due to false positives. > > Something along the lines of > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=2972#c9 > would be nice. > > -Weffc++ does warn about this, but it is too broad, as it includes > members that have a constructor. -Weffc++ being too broad is bug 16166. > > Here's a simple example: > > struct X > { > int a,b; > > X() : a(5) { } > }; > > X x; *** This bug has been marked as a duplicate of bug 16166 ***
[Bug c++/81431] add warning for missing initializers in constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81431 --- Comment #1 from Tom Tromey --- Also related is bug 55837.