[Libreoffice-commits] core.git: config_host/config_global.h.in configure.ac include/sal
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 17 17:57:56 UTC 2020
config_host/config_global.h.in | 1 -
configure.ac | 11 -----------
include/sal/types.h | 10 ++++------
3 files changed, 4 insertions(+), 18 deletions(-)
New commits:
commit b1982dfa0281e7af5872f62b4b507fe639ed3973
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Apr 17 16:28:28 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Apr 17 19:57:20 2020 +0200
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 at redhat.com>
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 99da1d93e6c7..d9a907f4b91f 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -13,7 +13,6 @@ Any change in this header will cause a rebuild of almost everything.
#define CONFIG_GLOBAL_H
#define HAVE_GCC_BUILTIN_ATOMIC 0
-#define HAVE_GCC_DEPRECATED_MESSAGE 0
#define HAVE_SYSLOG_H 0
// Compiler supports all of C++2a <https://wg21.link/P0202R3> "Add Constexpr Modifiers to Functions
diff --git a/configure.ac b/configure.ac
index 309b298398c8..c3ef52dc65c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6304,17 +6304,6 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
AC_MSG_RESULT([no])
fi
- AC_MSG_CHECKING([whether $CC_BASE supports __attribute__((deprecated(message)))])
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- __attribute__((deprecated("test"))) void f();
- ])], [
- AC_DEFINE([HAVE_GCC_DEPRECATED_MESSAGE],[1])
- AC_MSG_RESULT([yes])
- ], [AC_MSG_RESULT([no])])
- CFLAGS=$save_CFLAGS
-
AC_MSG_CHECKING([whether $CXX_BASE defines __base_class_type_info in cxxabi.h])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
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
More information about the Libreoffice-commits
mailing list