Review Request 113189: lower (a lot) warning noise caused by undefined macros

Bernd Buschinski b.buschinski at googlemail.com
Thu Oct 10 12:59:16 BST 2013


-----------------------------------------------------------
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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131010/63f31f8a/attachment.htm>


More information about the kde-core-devel mailing list