gcc 4.6 for package monkeys

Jakub Jelinek jakub at redhat.com
Fri Jan 28 08:06:54 UTC 2011


On Fri, Jan 28, 2011 at 08:26:36AM +0100, Julian Sikorski wrote:
> I have just run into an issue with gcc-4.6, namely RPM Fusion's mame
> failed to compile [1]. I was told that #include <stddef.h> was missing.
> So I have two questions: why did including this header directly became
> necessary (code builds fine with 4.5) and are there any other issues we
> package monkeys might run into with a new compiler?

Some C++ headers were including <cstdef> header internally just so that they
could use std::size_t and std::ptrdiff_t.  Those types are in 4.6+ defined
in an internal libstdc++ header using compiler builtin preprocessor macros
(that existed for a while), so if you need anything else from
<cstddef>/<stddef.h>, you need to include it yourself, as basically none
of the standard C++ headers include <cstddef> any more.

For more details see:
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg00257.html
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160231

	Jakub


More information about the devel mailing list