[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request 113189: lower (a lot) warning noise caused by undefined macros
From:       "Bernd Buschinski" <b.buschinski () googlemail ! com>
Date:       2013-10-10 11:59:16
Message-ID: 20131010115916.9042.87571 () vidsolbach ! de
[Download RAW message or body]

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113189/#review41489
-----------------------------------------------------------


This is a bit confussing...

lets sum up the background story:
- kjs(/wtf) loves gcc features
- kjs-cmake filters out (gcc) pedantic

now comes the problem... whats with other compilers?

if you look at the commit message that caused the warnings:

"According to CPP standards (defined(X) && X) should be the same of just (X). On the \
other hand it is undefined behavior if 'defined' appears in a macro expansion. gcc \
-pedantic and icl evaluates them always to false." ( \
http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=75fa90c16232186bbd287a2ac79839ea34da32c4 \
)

-> "it is undefined behavior if 'defined' appears in a macro expansion" <-

So? Whats the correct solution here?
And yes, I agree the warnings ARE annoying.

But I would like to hear a second opinion here :)

- Bernd Buschinski


On Oct. 10, 2013, 10:52 a.m., Jiří Pinkava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113189/
> -----------------------------------------------------------
> 
> (Updated Oct. 10, 2013, 10:52 a.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> There is a lot of warning noise in kdelibs build, this decreases number of warnings \
> a lot. 
> I have 'git grep'ped the code and checked all usages, and found no problem.
> 
> Tested by compile/usage. 
> 
> 
> Diffs
> -----
> 
> kjs/wtf/Platform.h 843cfd2 
> 
> Diff: http://git.reviewboard.kde.org/r/113189/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jiří Pinkava
> 
> 


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/113189/">http://git.reviewboard.kde.org/r/113189/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is a bit \
confussing...

lets sum up the background story:
- kjs(/wtf) loves gcc features
- kjs-cmake filters out (gcc) pedantic

now comes the problem... whats with other compilers?

if you look at the commit message that caused the warnings:

&quot;According to CPP standards (defined(X) &amp;&amp; X) should be the same of just \
(X). On the other hand it is undefined behavior if &#39;defined&#39; appears in a \
macro expansion. gcc -pedantic and icl evaluates them always to false.&quot; ( \
http://quickgit.kde.org/?p=kdelibs.git&amp;a=commit&amp;h=75fa90c16232186bbd287a2ac79839ea34da32c4 \
)

-&gt; &quot;it is undefined behavior if &#39;defined&#39; appears in a macro \
expansion&quot; &lt;-

So? Whats the correct solution here?
And yes, I agree the warnings ARE annoying.

But I would like to hear a second opinion here :)</pre>
 <br />









<p>- Bernd Buschinski</p>


<br />
<p>On October 10th, 2013, 10:52 a.m. UTC, Jiří Pinkava wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kdelibs.</div>
<div>By Jiří Pinkava.</div>


<p style="color: grey;"><i>Updated Oct. 10, 2013, 10:52 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</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;">There is a lot of warning noise in kdelibs build, this decreases number \
of warnings a lot.

I have &#39;git grep&#39;ped the code and checked all usages, and found no problem.

Tested by compile/usage. </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>kjs/wtf/Platform.h <span style="color: grey">(843cfd2)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/113189/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic