[OE-core] [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6

Paul Eggleton paul.eggleton at linux.intel.com
Fri Feb 10 14:09:25 UTC 2012


On Friday 10 February 2012 14:03:06 Phil Blundell wrote:
> On Fri, 2012-02-10 at 13:56 +0000, Paul Eggleton wrote:
> > What the code is attempting to do is provide its own "nullptr" if it isn't
> > being provided as part of the language:
> > 
> > ------------------------------
> > #if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) &&
> > defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >=
> > 1600 && !COMPILER(INTEL))
> > 
> > #define HAVE_NULLPTR 1
> > 
> > #else
> > 
> > namespace std {
> > 
> >     class nullptr_t { };
> > 
> > }
> > 
> > extern std::nullptr_t nullptr;
> > 
> > #endif
> > ------------------------------
> > 
> > gcc 4.6 is preempting this and complaining about the use of the
> > identifier. I don't think renaming it is going to be acceptable upstream
> > either.

> Does it work if you build with -std=c++0x?

It does, yes (well, compiling the above code on its own anyway).

-- 

Paul Eggleton
Intel Open Source Technology Centre




More information about the Openembedded-core mailing list