summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-08-11 15:15:18 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-08-13 02:20:40 +0200
commit986fea905871c92dd540bd3ff5e3b7adaf9d4073 (patch)
tree6515994e3974af19fc642b4e349f0350b95c8edc /src/corelib/global/qglobal.h
parent042290d0fb8ea99b2e6c6a5f17359ffc58222ded (diff)
Move some compiler-specific macros to qcompilerdetection.h
Task-number: QTBUG-99313 Change-Id: Ia381fc0242090ee08ae734421274dcef15709778 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 930252dad3..c38fa385f2 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -186,53 +186,6 @@ Q_CORE_EXPORT Q_DECL_CONST_FUNCTION const char *qVersion(void) Q_DECL_NOEXCEPT;
# define QT_ASCII_CAST_WARN
#endif
-#ifdef Q_PROCESSOR_X86_32
-# if defined(Q_CC_GNU)
-# define QT_FASTCALL __attribute__((regparm(3)))
-# elif defined(Q_CC_MSVC)
-# define QT_FASTCALL __fastcall
-# else
-# define QT_FASTCALL
-# endif
-#else
-# define QT_FASTCALL
-#endif
-
-// enable gcc warnings for printf-style functions
-#if defined(Q_CC_GNU) && !defined(__INSURE__)
-# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
-# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B) \
- __attribute__((format(gnu_printf, (A), (B))))
-# else
-# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B) \
- __attribute__((format(printf, (A), (B))))
-# endif
-#else
-# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B)
-#endif
-
-#ifdef Q_CC_MSVC
-# define Q_NEVER_INLINE __declspec(noinline)
-# define Q_ALWAYS_INLINE __forceinline
-#elif defined(Q_CC_GNU)
-# define Q_NEVER_INLINE __attribute__((noinline))
-# define Q_ALWAYS_INLINE inline __attribute__((always_inline))
-#else
-# define Q_NEVER_INLINE
-# define Q_ALWAYS_INLINE inline
-#endif
-
-//defines the type for the WNDPROC on windows
-//the alignment needs to be forced for sse2 to not crash with mingw
-#if defined(Q_OS_WIN)
-# if defined(Q_CC_MINGW) && defined(Q_PROCESSOR_X86_32)
-# define QT_ENSURE_STACK_ALIGNED_FOR_SSE __attribute__ ((force_align_arg_pointer))
-# else
-# define QT_ENSURE_STACK_ALIGNED_FOR_SSE
-# endif
-# define QT_WIN_CALLBACK CALLBACK QT_ENSURE_STACK_ALIGNED_FOR_SSE
-#endif
-
/*
Utility macros and inline functions
*/
@@ -502,27 +455,6 @@ constexpr std::underlying_type_t<Enum> qToUnderlying(Enum e) noexcept
return static_cast<std::underlying_type_t<Enum>>(e);
}
-#ifdef __cpp_conditional_explicit
-#define Q_IMPLICIT explicit(false)
-#else
-#define Q_IMPLICIT
-#endif
-
-#ifdef __cpp_constinit
-# if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG)
- // https://developercommunity.visualstudio.com/t/C:-constinit-for-an-optional-fails-if-/1406069
-# define Q_CONSTINIT
-# else
-# define Q_CONSTINIT constinit
-# endif
-#elif defined(__has_cpp_attribute) && __has_cpp_attribute(clang::require_constant_initialization)
-# define Q_CONSTINIT [[clang::require_constant_initialization]]
-#elif defined(Q_CC_GNU_ONLY) && Q_CC_GNU >= 1000
-# define Q_CONSTINIT __constinit
-#else
-# define Q_CONSTINIT
-#endif
-
template <typename T> inline T *qGetPtrHelper(T *ptr) noexcept { return ptr; }
template <typename Ptr> inline auto qGetPtrHelper(Ptr &ptr) noexcept -> decltype(ptr.get())
{ static_assert(noexcept(ptr.get()), "Smart d pointers for Q_DECLARE_PRIVATE must have noexcept get()"); return ptr.get(); }