[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - config_host/config_global.h.in configure.ac editeng/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jan 25 15:35:37 UTC 2019
config_host/config_global.h.in | 4 ++++
configure.ac | 15 +++++++++++++++
editeng/source/editeng/editeng.cxx | 5 +++++
3 files changed, 24 insertions(+)
New commits:
commit 4627da3af6ff6664c4124362743b50caa0aa3a3a
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 28 17:07:16 2018 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Jan 25 16:35:08 2019 +0100
Silence bogus -Werror=redundant-move (GCC 9)
Change-Id: Ia078fb8e1e497edfa08e2a61d1659100461fc52e
Reviewed-on: https://gerrit.libreoffice.org/59720
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/66914
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index e0dc1418e9cb..d070373b4350 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -23,4 +23,8 @@ Any change in this header will cause a rebuild of almost everything.
/* Compiler supports __attribute__((warn_unused)). */
#define HAVE_GCC_ATTRIBUTE_WARN_UNUSED 0
+/* GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87150> "move ctor wrongly chosen in return
+ stmt (derived vs. base)": */
+#define HAVE_GCC_BUG_87150 0
+
#endif
diff --git a/configure.ac b/configure.ac
index 795712ea084e..5fb500c7fafa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6191,6 +6191,21 @@ if test "$GCC" = yes; then
fi
AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
+AC_MSG_CHECKING([whether $CXX has GCC bug 87150])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ struct S1 { S1(S1 &&); };
+ struct S2: S1 {};
+ S1 f(S2 s) { return s; }
+ ])], [
+ AC_DEFINE([HAVE_GCC_BUG_87150],[1])
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 6116d702242b..01b00ece1297 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -19,6 +19,7 @@
#include <memory>
#include <comphelper/lok.hxx>
+#include <config_global.h>
#include <vcl/wrkwin.hxx>
#include <vcl/dialog.hxx>
#include <vcl/msgbox.hxx>
@@ -2624,7 +2625,11 @@ vcl::Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, SvtScri
{
SvxFont aFont;
CreateFont( aFont, rItemSet, true, nScriptType );
+#if HAVE_GCC_BUG_87150
+ return aFont;
+#else
return std::move(aFont);
+#endif
}
SvxFont EditEngine::CreateSvxFontFromItemSet( const SfxItemSet& rItemSet )
More information about the Libreoffice-commits
mailing list