[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 13:56:44 UTC 2012
On Thursday 09 February 2012 13:19:22 Khem Raj wrote:
> since there is a namespace conflict that should be fixed IMO removing
> Wrror is not quite the right thing to do here IMO.
So removing -Werror is somewhat heavy-handed, yes; perhaps we can simply
add -Wno-error=c++0x-compat and mark this patch as inappropriate for
upstreaming instead?
> Its a workaround but probably upstream wont
> accept it. So change nullptr here to something like qt_nullptr in source
> tree
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.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list