D18167: Move -Wsuggest-override -Wlogical-op to regular compiler settings

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Mon Jan 21 08:42:58 GMT 2019


kossebau added a comment.


  In D18167#397319 <https://phabricator.kde.org/D18167#397319>, @graesslin wrote:
  
  > For done code this warning is pointless and negative. I invite you to work with a code base like KWin where it is more important to have a working git blame than protection for theoretical problems. Nobody will be able to guarantee that a 500+ change to add override won't break. Human errors happen, nobody will be able to review something like that. Addressing this warning by adding override all over our legacy code base has a serious risk.
  >
  > I'm seriously pissed that this is forced on us and we have to change code.
  >
  > I'm totally fine with this warning for new code and new projects. But let projects opt in for it instead of forcing it on legacy code bases.
  
  
  @graesslin  You, I and most if not all people are not happy if things change around us where we were fine with the status quo, so I understand you here. Just, please also understand the motivation for this change, which is about what is the recommended default for (KDE) projects. The alternatives would be to not change anything ever or to stick to the lowest common denominator. Would you agree those are less preferable solutions?
  As a matter of fact, the (felt?) majority of maintained KDE projects meanwhile has been upgraded to the improved expressiveness of what the meanwhile rather old C++11 standards brings in terms of override (& nullptr). Especially as the upgrade usually can be done automated using compiler-powered tools, like clang-tidy, so the human factor is reduced by a good degree. My personal experience has been that one has rather found existing issues than introduced regressions. Especially with stone-age-old C++ codebases where lots of different lead developers had shifted designs in different directions, leaving some incomplete parts behind here and there accidentally when changing signatures of APIs.
  
  So for KWin, if no-one dares to touch the old xcb(?) codebase (which actually means it is not "owned" any longer, but "owns" the developers), please now do the opt-out from the default by explicitly disabling that compiler flag for the legacy codebase. Again, the settings of the ECM KDE definition macros are not forced on people, just set the recommended defaults.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D18167

To: aacid
Cc: kossebau, graesslin, apol, vkrause, kde-frameworks-devel, kde-buildsystem, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20190121/4df63b8f/attachment-0001.html>


More information about the Kde-buildsystem mailing list