Compilation with GCC 4.6


I recently switched to GCC 4.6.0, and compiled (nearly) all of svn trunk resp.
git master. Everything went fine, except for two issues:

* Eigen2 uses ptrdiff_t, but does not include <cstddef>, causing a compilation
error in "calligra" and "kstars". This bug has been reported to Eigen
developers[1], so the question is, if we should just ignore the bug, in other
words, "if you use a newer gcc, make sure you try to find a newer Eigen" or if
we should help here and add a few temporary include lines; I have local
patches for calligra and kstars adding those.

* There is an annoying[2] warning in
kdelibs/kdecore/config/conversion_check.h about unused variable x in lines
53 and 60. It looks like the Q_UNUSED needs to be moved to the template
function where the variable is first defined, right? Proposed patch on RB[3].

A third issue in playground/games has been reported to the respective author.

Generally, I can only recommend GCC 4.6.0; it issues some additional
warnings and also produces better code for certain constructs, while being a
bit faster at it, too.

Christoph Feck (kdepepo)

[1] <a href="" title=""></a>
[2] It is only annoying because it shows up nearly everywhere
[3] <a href="" title=""></a>


Re: Compilation with GCC 4.6

By Cyrille Berger Skott at 04/16/2011 - 19:30


On Saturday 16 April 2011, Christoph Feck wrote:
I think it would be better to help there and put the include in our code. New
release of eigen 2 might or might not happen, and will takes time anyway.