> On Oct. 10, 2013, 11:59 a.m., Bernd Buschinski wrote: > > 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 :)
IIRC when I was trying to filter out these warnings to debug some Clang issues, the define flags in question are always non-zero if they are defined at all. So it might be possible to replace #if with #ifdef instead. - Michael ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/113189/#review41489 ----------------------------------------------------------- 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 > >