diff options
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 9f79b3e70c..ba830977ad 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -914,6 +914,13 @@ //# define Q_COMPILER_UNIFORM_INIT # define Q_COMPILER_UNRESTRICTED_UNIONS # endif +# if _MSC_FULL_VER >= 190023419 +# define Q_COMPILER_ATTRIBUTES +// Almost working, see https://connect.microsoft.com/VisualStudio/feedback/details/2011648 +//# define Q_COMPILER_CONSTEXPR +# define Q_COMPILER_THREADSAFE_STATICS +# define Q_COMPILER_UNIFORM_INIT +# endif # endif /* __cplusplus */ #endif /* Q_CC_MSVC */ @@ -922,24 +929,26 @@ # if defined(Q_OS_QNX) // QNX: test if we are using libcpp (Dinkumware-based). // Older versions (QNX 650) do not support C++11 features -// _HAS_CPP0X is defined by toolchains that actually include +// _HAS_* macros are set to 1 by toolchains that actually include // Dinkum C++11 libcpp. -# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_CPP0X) +# if !__GLIBCXX__ +# if !_HAS_CPP0X // Disable C++11 features that depend on library support # undef Q_COMPILER_INITIALIZER_LISTS # undef Q_COMPILER_RVALUE_REFS # undef Q_COMPILER_REF_QUALIFIERS # undef Q_COMPILER_UNICODE_STRINGS # undef Q_COMPILER_NOEXCEPT -# endif -# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_NULLPTR_T) +# endif // !_HAS_CPP0X +# if !_HAS_NULLPTR_T # undef Q_COMPILER_NULLPTR -# endif -# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_CONSTEXPR) +# endif //!_HAS_NULLPTR_T +# if !_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 +# endif // !_HAS_CONSTEXPR +# endif // !__GLIBCXX__ # endif // Q_OS_QNX # if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) @@ -1143,7 +1152,7 @@ # define QT_WARNING_PUSH QT_DO_PRAGMA(clang diagnostic push) # define QT_WARNING_POP QT_DO_PRAGMA(clang diagnostic pop) # define QT_WARNING_DISABLE_CLANG(text) QT_DO_PRAGMA(clang diagnostic ignored text) -# define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text) // GCC directives work in Clang too +# define QT_WARNING_DISABLE_GCC(text) # define QT_WARNING_DISABLE_INTEL(number) # define QT_WARNING_DISABLE_MSVC(number) #elif defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) |