Review Request 129724: [frameworks] Enable -Wsuggest-override for g++ >= 5.0.0

Michael Pyne mpyne at kde.org
Fri Dec 30 16:43:25 UTC 2016



> On Dec. 30, 2016, 6:39 a.m., Martin Gräßlin wrote:
> > Is that enabled by default now? I hope not! This is a completely useless warning for all frameworks (as we are not allowed to use override) and even more for a legacy code bases. I don't want to have to adjust the cmake in all projects I maintain to silence this warning again. And even less I want to spent days adding overrides to legacy code base.
> 
> Laurent Montel wrote:
>     We can use Q_DECL_OVERRIDE which is replaced by override when your gcc support it. So There is not a problem to use this flags no ?
> 
> Martin Gräßlin wrote:
>     I commented on that aspect in the past. We cannot have both: enforce C++11 and at the same time keep compatibility to no C++11.
>     
>     
>     
>     We need to find a real line and not bullshit around with macros.
>     
>     
>     
>     Either we say C++11 then enable all of it, or say no. But then no earnings please.
>     
>     
>     
>     I'm seriously annoyed by the stupid dance we are doing.

The Clang warning flag is not documented very well but everything I've been able to find seems to indicate it became a default warning when it was added in LLVM 3.6.  However some simple testcases I've run against a more recent LLVM (3.9) fail to trip the warning even after enabling optimization, ensuring C++11 is enabled, using various combinations of override combinations, etc.  So it seems that at least in recent LLVM this may not be a source of much noise even though it's enabled by default.  But there are a lot of complaints online about this warning for LLVM 3.6 so it's going to be with us one way or another anyways.

I'm sympathetic to the point about either supporting C++11 or not instead of having to guess which of its subfeatures we can use, especially since our "supported compilers page" (https://community.kde.org/Frameworks/Policies#Frameworks_compiler_requirements_and_C.2B.2B11) that tells us what we can use appears to be resistant to being located from a search engine.  But that's the kind of thing that would need discussion on the mailing list and it seems to me like we've repainted that shed several times over already.


- Michael


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129724/#review101664
-----------------------------------------------------------


On Dec. 29, 2016, 11:48 p.m., Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129724/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 11:48 p.m.)
> 
> 
> Review request for Build System and KDE Frameworks.
> 
> 
> Repository: extra-cmake-modules
> 
> 
> Description
> -------
> 
> Gives a nice warning about something that should be marked as override but isn't
> 
> 
> Diffs
> -----
> 
>   kde-modules/KDEFrameworkCompilerSettings.cmake 038ddc3 
> 
> Diff: https://git.reviewboard.kde.org/r/129724/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Albert Astals Cid
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161230/de8b1cd3/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list