I left one comment on bitbucket.
The pull request is definitely an improvement. The lack of virtual destructor in
ConstraintGenerator is actually a serious bug that could have caused crashes or
other undefined behaviour, so it's great to see it fixed. (So this is not just a
change to make a particular compiler happy, it's an actual bug that needs fixing.)
It would be very nice to catch such things automatically in the future, and
options like -Weffc++ sound good. I understand Florian's concern in combination
with -Werror, though. Perhaps we should consider supporting building in two
different modes, with and without -Werror, have -Werror off by default, but
enable it in some or all buildbot configurations. That way we get stricter
checking, but don't have to worry about breaking other people's builds for no
good reason. On the other hand, forcing -Werror on our users has caught code
issues in the past, so there are also downsides. Perhaps it would be enough to
tell people clearly that we're interested in hearing about any warnings they get.
Regarding the unused registry attribute, if this were a more
performance-critical class, I would argue that we should only include the
attribute in the class in a debug build, but for this particular class it's
probably not worth bothering with the complications of conditional compilation.
|