[Development] QNX and Dinkumware support for constexpr and nullptr

Thiago Macieira thiago.macieira at intel.com
Wed Oct 28 00:40:07 CET 2015


Hello QNX experts

ref https://codereview.qt-project.org/121146 and 
http://testresults.qt.io/logs/qt/qtbase/5dae65fe1934e8565af317da17b4d8f42f1d7b8f/LinuxRHEL_6_6x86_64QNXQNX_660armv5GCCRelease_DisableTests_OpenGLES2/da39a3ee5e6b4b0d3255bfef95601890afd80709/buildlog.txt.gz

For Qt 5.7, we agreed that nullptr support was a required C++11 feature. An 
additional requirement comes from the use of std::atomic: constexpr 
support[1].

The integration above failed on a QNX 6.6 build due to constexpr support being 
missing. So the question is: does Dinkumware support it? 

In fact, does it even support <atomic>? The header is supplied by GCC, but 
it's in the libstdc++-v3/include hierarchy, so QNX may have disabled it.

>From qcompilerdetection.h:

#  if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_NULLPTR_T)
#    undef Q_COMPILER_NULLPTR
#  endif
#  if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_CONSTEXPR)
// The libcpp is missing constexpr keywords on important functions like 
std::numeric_limits<>::min()
// Disable constexpr support on QNX even if the compiler supports it
#    undef Q_COMPILER_CONSTEXPR
#  endif

The check for certain defines indicates that there are versions of DW with the 
necessary support. Are those available for QNX 6.6 toolchains?

If so, how soon can the CI be upgraded to those toolchains?

If not, we'll have to make some hard decisions.

PS: I'm assuming the block immediately above the code pasted above is not 
active in 6.6, because rvalue references are also required for Qt 5.7.

[1] does not apply to MSVC, so you may not use constexpr unconditionally in Qt 
code.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list