diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-04-17 16:28:28 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-04-17 19:57:20 +0200 |
commit | b1982dfa0281e7af5872f62b4b507fe639ed3973 (patch) | |
tree | 9211d30004dc7687b0b3afa8facb842c2e8fa079 /include/sal | |
parent | 141e0449fdab89384564659191492b698e4b13d8 (diff) |
No need for HAVE_GCC_DEPRECATED_MESSAGE
GCC appears to support it at least since <https://gcc.gnu.org/git/
?p=gcc.git;a=commit;h=9b86d6bb25587db93a322bf5778e9892aaa8b776> "re PR c/36892
(Support __attribute__((deprecated("text string"))))" in GCC 4.5, and Clang
appears to support it at least since <https://github.com/llvm/llvm-project/
commit/c7890fed01f8c8accba188236d781af26845cb2c> "Add an optional string
argument to DeprecatedAttr for Fix-It" in Clang 3.9.
Change-Id: If0939c692703522523d1953c3793070e0f808973
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92455
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/sal')
-rw-r--r-- | include/sal/types.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/sal/types.h b/include/sal/types.h index 481657e9bc6c..8d19824b4184 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -27,10 +27,6 @@ #include "sal/macros.h" #include "sal/typesizes.h" -#if defined LIBO_INTERNAL_ONLY -#include "config_global.h" -#endif - #ifdef __cplusplus extern "C" { #endif @@ -455,10 +451,12 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { SAL_DEPRECATED("Don't use, it's evil.") void doit(int nPara); */ -#if HAVE_GCC_DEPRECATED_MESSAGE +#if defined __GNUC__ || defined __clang__ +#if defined LIBO_INTERNAL_ONLY # define SAL_DEPRECATED(message) __attribute__((deprecated(message))) -#elif defined __GNUC__ || defined __clang__ +#else # define SAL_DEPRECATED(message) __attribute__((deprecated)) +#endif #elif defined(_MSC_VER) # define SAL_DEPRECATED(message) __declspec(deprecated(message)) #else |