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

Phil Blundell philb at gnu.org
Fri Feb 10 14:03:06 UTC 2012


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?  If Qt is doing the above
then presumably it is at least attempting to be compatible with C++0X.

p. 





More information about the Openembedded-core mailing list