diff options
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 44077132d4..2b957782e8 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -98,6 +98,7 @@ # define Q_UNREACHABLE_IMPL() __assume(0) # define Q_NORETURN __declspec(noreturn) # define Q_DECL_DEPRECATED __declspec(deprecated) +# define Q_DECL_DEPRECATED_X(text) __declspec(deprecated(text)) # define Q_DECL_EXPORT __declspec(dllexport) # define Q_DECL_IMPORT __declspec(dllimport) /* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */ @@ -152,6 +153,9 @@ # define Q_CC_INTEL # define Q_ASSUME_IMPL(expr) __assume(expr) # define Q_UNREACHABLE_IMPL() __builtin_unreachable() +# if __INTEL_COMPILER >= 1300 +# define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) +# endif # elif defined(__clang__) /* Clang also masquerades as GCC */ # define Q_CC_CLANG @@ -173,6 +177,7 @@ # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable() +# define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) # endif # endif @@ -528,6 +533,9 @@ # if !__has_feature(cxx_rtti) # define QT_NO_RTTI # endif +# if __has_feature(attribute_deprecated_with_message) +# define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) +# endif /* C++11 features, see http://clang.llvm.org/cxx_status.html */ # if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -861,6 +869,9 @@ #ifndef Q_DECL_VARIABLE_DEPRECATED # define Q_DECL_VARIABLE_DEPRECATED Q_DECL_DEPRECATED #endif +#ifndef Q_DECL_DEPRECATED_X +# define Q_DECL_DEPRECATED_X(text) Q_DECL_DEPRECATED +#endif #ifndef Q_DECL_EXPORT # define Q_DECL_EXPORT #endif |