external/pdfium/gcc-c++20-comparison.patch |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 07a09195adc65722207390e355a202100bc608ff
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Jun 9 09:33:25 2021 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Jun 9 10:48:11 2021 +0200

    external/pdfium: Latest MSVC now needs the GCC workaround, too
    
    ...or else a build with MS VS 2019 16.10.0 and --with-latest-c++ would 
cause a
    stack overflow during CppunitTest_xmlsecurity_pdfsigning in the same way as
    described at 6391e3c4dcd4d61c2f95f996e797e49b5586dbd1 "external/pdfium: Work
    around GCC C++20 recursive comparison issue".  Interestingly, builds with 
recent
    Clang (on various platforms) and --with-latest-c++ do not run into that 
stack
    overflow issue, so it appears that Clang implements subtly different rules 
for
    C++20 and beyond here than do GCC and MSVC.  (The GCC issue
    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94141> "c++20 rewritten 
operator==
    recursive call mixing friend and external operators for template class"
    mentioned in external/pdfium/UnpackedTarball_pdfium.mk may not be the most
    accurate description of the precise issue at hand here, but lets keep it at 
that
    for now.  Its comments do mention "that some people are going to try and 
change
    the rules to avoid breaking code like this.")
    
    But regardless of what the exact rules are for C++20 and beyond, these
    problematic overloads are only needed for C++17 and earlier anyway, as 
C++20 can
    cover them with automatic rewrites of other operators.  So lets generally
    disable them for C++20 and beyond.
    
    Change-Id: I99033d6f09f069f00a6916ef40fd03dd4962a5c4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116882
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/external/pdfium/gcc-c++20-comparison.patch 
b/external/pdfium/gcc-c++20-comparison.patch
index e81cb4fe2aa7..0895ea8b5f9d 100644
--- a/external/pdfium/gcc-c++20-comparison.patch
+++ b/external/pdfium/gcc-c++20-comparison.patch
@@ -4,7 +4,7 @@
    mutable intptr_t m_nRefCount = 0;
  };
  
-+#if !(defined __GNUC__ && !defined __clang__ && __cplusplus > 201703L)
++#if __cplusplus < 202002L
  template <typename T, typename U>
  inline bool operator==(const U* lhs, const RetainPtr<T>& rhs) {
    return rhs == lhs;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to