[Libreoffice-commits] core.git: config_host/config_global.h.in configure.ac editeng/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Dec 14 12:41:06 UTC 2019


 config_host/config_global.h.in     |   18 +++++++++++++++---
 configure.ac                       |    4 ++--
 editeng/source/editeng/editeng.cxx |    2 +-
 3 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 736229b20c94c502c91e2177fdd1719719c0a083
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Dec 14 12:57:36 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Dec 14 13:40:18 2019 +0100

    Rename HAVE_GCC_BUG_87150 to HAVE_P1155R3
    
    ...to match the new reality (see comment in config_host/config_global.h.in)
    
    Change-Id: I5450e520d8b82584e3fd71d7e42a6840993b5ddb
    Reviewed-on: https://gerrit.libreoffice.org/85142
    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 5b04594c12f5..f7672d211647 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -32,8 +32,20 @@ Any change in this header will cause a rebuild of almost everything.
 // Useable C++2a <span>:
 #define HAVE_CPP_SPAN 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
+/* "CWG motion 23: P1825R0 'Merged wording for P0527R1 and P1155R3' (DR)" in
+   <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/n4829.html> "N4829 Editors' Report --
+   Programming Languages -- C++" marks
+   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1155r3.html> "More implicit moves" as a
+   DR.  Some versions of GCC already implemented it prior to the fix for
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87150> "move ctor wrongly chosen in return stmt
+   (derived vs. base)"; MSVC++ 14.24 started to implement it, see <https://
+   developercommunity.visualstudio.com/content/problem/852827/
+   msvc-1424-started-to-chose-move-ctor-in-return-der.html> "MSVC++ 14.24 started to chose move ctor
+   in return derived vs. base".  At least Clang 9, which does not implement it, emits
+   -Werror,-Wreturn-std-move when it therefore considers a std::move to be missing.  On the other
+   hand, at least some versions of GCC would emit -Werror=redundant-move in places where such a
+   std::move would be added unconditionally, see c00948d9bd35dfb15a331c2163f32e9ee24644fd "Silence
+   bogus -Werror=redundant-move (GCC 9)". */
+#define HAVE_P1155R3 0
 
 #endif
diff --git a/configure.ac b/configure.ac
index adde073750e1..60c78636f363 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6717,7 +6717,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
 
-AC_MSG_CHECKING([whether $CXX_BASE has GCC bug 87150])
+AC_MSG_CHECKING([whether $CXX_BASE implements C++ DR P1155R3])
 AC_LANG_PUSH([C++])
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
@@ -6726,7 +6726,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
         struct S2: S1 {};
         S1 f(S2 s) { return s; }
     ])], [
-        AC_DEFINE([HAVE_GCC_BUG_87150],[1])
+        AC_DEFINE([HAVE_P1155R3],[1])
         AC_MSG_RESULT([yes])
     ], [AC_MSG_RESULT([no])])
 CXXFLAGS=$save_CXXFLAGS
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 2cf4d88a9e6d..c75fcf90e5ea 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2637,7 +2637,7 @@ vcl::Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, SvtScri
 {
     SvxFont aFont;
     CreateFont( aFont, rItemSet, true, nScriptType );
-#if HAVE_GCC_BUG_87150
+#if HAVE_P1155R3
     return aFont;
 #else
     return std::move(aFont);


More information about the Libreoffice-commits mailing list