[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-buildsystem
Subject: Re: Review Request 129724: [frameworks] Enable -Wsuggest-override for g++ >= 5.0.0
From: Michael Pyne <mpyne () kde ! org>
Date: 2016-12-30 16:43:25
Message-ID: 20161230164325.27201.2977 () mimi ! kde ! org
[Download RAW message or body]
--===============7392878209468419325==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
> 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
>
>
--===============7392878209468419325==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/129724/">https://git.reviewboard.kde.org/r/129724/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On December 30th, 2016, 6:39 a.m. UTC, <b>Martin \
Gräßlin</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p></pre> </blockquote>
<p>On December 30th, 2016, 7:28 a.m. UTC, <b>Laurent Montel</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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 ?</p></pre> </blockquote>
<p>On December 30th, 2016, 8:01 a.m. UTC, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">We need to find a real \
line and not bullshit around with macros.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Either we say C++11 \
then enable all of it, or say no. But then no earnings please.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'm \
seriously annoyed by the stupid dance we are doing.</p></pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre> <br />
<p>- Michael</p>
<br />
<p>On December 29th, 2016, 11:48 p.m. UTC, Albert Astals Cid wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Build System and KDE Frameworks.</div>
<div>By Albert Astals Cid.</div>
<p style="color: grey;"><i>Updated Dec. 29, 2016, 11:48 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
extra-cmake-modules
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Gives a nice warning about something that should be \
marked as override but isn't</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kde-modules/KDEFrameworkCompilerSettings.cmake <span style="color: \
grey">(038ddc3)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/129724/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============7392878209468419325==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic