diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index a5c7cf4a912..df27cbf10c8 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -78,7 +78,9 @@ # if _MSC_VER < 1938 // stdext is deprecated since VS 2022 17.8 # define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) stdext::make_checked_array_iterator(x, size_t(N)) // Since _MSC_VER >= 1500 # endif -# define Q_COMPILER_COMPLAINS_ABOUT_RETURN_AFTER_UNREACHABLE +# ifdef Q_CC_MSVC_ONLY +# define Q_COMPILER_COMPLAINS_ABOUT_RETURN_AFTER_UNREACHABLE +# endif #elif defined(__BORLANDC__) || defined(__TURBOC__) # define Q_CC_BOR