summaryrefslogtreecommitdiff
path: root/external/pdfium
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-09 09:33:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-09 10:48:11 +0200
commit07a09195adc65722207390e355a202100bc608ff (patch)
tree7c4aa8d2b76d519b5019df76874c700e08bf305e /external/pdfium
parent92556e330ede97e11ae2cbc487bb298e6bbcb6bf (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'external/pdfium')
-rw-r--r--external/pdfium/gcc-c++20-comparison.patch2
1 files changed, 1 insertions, 1 deletions
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;