diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-10 21:56:48 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-11 07:58:38 +0100 |
commit | fe99cac64957b364c75f09d9a92ccb4db4373604 (patch) | |
tree | 53cac7ec8132863d6f773d19cefacc112b9329d3 | |
parent | 2b4094195eb89d9bfd41908cbb32a8b964efd9fe (diff) |
external/graphite: operation between different enumeration types
> workdir/UnpackedTarball/graphite/src/Pass.cpp:197:92: error: invalid arithmetic between different enumeration types ('status_t' and 'graphite2::errors')
> 197 | || e.test(m_cPConstraint.status() != Code::loaded, m_cPConstraint.status() + E_CODEFAILURE))
> | ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
etc. as reported now with --with-latest-c++ (i.e., in C++26 mode) by Clang 18
trunk since
<https://github.com/llvm/llvm-project/commit/1cbd52f791d3f088246526c0801634edb65cee31>
"[Clang] Implement P2864R2 Remove Deprecated Arithmetic Conversion on
Enumerations (#73105)"
Change-Id: I34b2743d46b8f46b1f39b2af812f95876e4b9e38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160550
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
-rw-r--r-- | external/graphite/UnpackedTarball_graphite.mk | 1 | ||||
-rw-r--r-- | external/graphite/enumarith.patch | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/external/graphite/UnpackedTarball_graphite.mk b/external/graphite/UnpackedTarball_graphite.mk index 464fcc256069..0f678542e80f 100644 --- a/external/graphite/UnpackedTarball_graphite.mk +++ b/external/graphite/UnpackedTarball_graphite.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,graphite,0)) $(eval $(call gb_UnpackedTarball_add_patches,graphite, \ external/graphite/ubsan.patch \ + external/graphite/enumarith.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/graphite/enumarith.patch b/external/graphite/enumarith.patch new file mode 100644 index 000000000000..f5b83097f2b6 --- /dev/null +++ b/external/graphite/enumarith.patch @@ -0,0 +1,22 @@ +--- src/Pass.cpp ++++ src/Pass.cpp +@@ -194,7 +194,7 @@ + m_cPConstraint = vm::Machine::Code(true, pcCode, pcCode + pass_constraint_len, + precontext[0], be::peek<uint16>(sort_keys), *m_silf, face, PASS_TYPE_UNKNOWN); + if (e.test(!m_cPConstraint, E_OUTOFMEM) +- || e.test(m_cPConstraint.status() != Code::loaded, m_cPConstraint.status() + E_CODEFAILURE)) ++ || e.test(m_cPConstraint.status() != Code::loaded, +m_cPConstraint.status() + E_CODEFAILURE)) + return face.error(e); + face.error_context(face.error_context() - 1); + } +@@ -266,8 +266,8 @@ + r->constraint = new (m_codes+n*2-1) vm::Machine::Code(true, rc_begin, rc_end, r->preContext, r->sort, *m_silf, face, pt, &prog_pool_free); + + if (e.test(!r->action || !r->constraint, E_OUTOFMEM) +- || e.test(r->action->status() != Code::loaded, r->action->status() + E_CODEFAILURE) +- || e.test(r->constraint->status() != Code::loaded, r->constraint->status() + E_CODEFAILURE) ++ || e.test(r->action->status() != Code::loaded, +r->action->status() + E_CODEFAILURE) ++ || e.test(r->constraint->status() != Code::loaded, +r->constraint->status() + E_CODEFAILURE) + || e.test(!r->constraint->immutable(), E_MUTABLECCODE)) + return face.error(e); + } |