This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH c++] Reduce -Weffc++ Rule 12 false positives
Dirk Mueller <dmueller@suse.de> writes:
| On Tuesday, 7. February 2006 22:44, Mark Mitchell wrote:
|
| > It's been a long time since I've read the book, but to me the point of
| > the rule is that constructors are for initializing things
|
| I agree. However the warning only triggers if a member isn't listed in the
| initialisation list, even if it is later initialized in the constructor body.
what I do not understand is the POD/non-POD criteria. Why shall we
warn on a member that is implicitly initialized by ots default
constructor and remain silent about a member that is never
initialized. That reads completely backward to me.
[...]
| (And this is only the first of a probably long series of fixups that still
| have to be done).
-Weffc++ should be fixed; but I'm not sure your patch is in that
direction. As for copy-constructor and the like, please see the
libstdc++ recurrent discussions. Also the bugzilla database must
have a half dozen of related PRs. If you compile modern C++ codes
with -Weffc++, you'll notice more noise than useful advice.
-- Gaby