b89c84bf3b
...as seen failing with --with-latest-c++ and recent Clang 18 trunk, In file included from workdir/UnpackedTarball/firebird/src/jrd/Collation.cpp:105: > workdir/UnpackedTarball/firebird/src/jrd/../jrd/SimilarToMatcher.h:1462:11: error: invalid bitwise operation between different enumeration types ('const Op' and 'MatchState') > 1462 | switch (ENCODE_OP_STATE(node->op, state)) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/firebird/src/jrd/../jrd/SimilarToMatcher.h:1458:42: note: expanded from macro 'ENCODE_OP_STATE' > 1458 | #define ENCODE_OP_STATE(op, state) ((op) | (state)) > | ~~~~ ^ ~~~~~~~ > workdir/UnpackedTarball/firebird/src/jrd/../jrd/SimilarToMatcher.h:561:3: note: in instantiation of member function 'Firebird::SimilarToMatcher<unsigned char>::Evaluator::match' requested here > 561 | match(); > | ^ > workdir/UnpackedTarball/firebird/src/jrd/../jrd/SimilarToMatcher.h:462:20: note: in instantiation of member function 'Firebird::SimilarToMatcher<unsigned char>::Evaluator::getResult' requested here > 462 | return evaluator.getResult(); > | ^ > workdir/UnpackedTarball/firebird/src/jrd/Collation.cpp:787:29: note: in instantiation of member function 'Firebird::SimilarToMatcher<unsigned char>::evaluate' requested here > 787 | return pSimilarToMatcher::evaluate(pool, this, s, sl, p, pl, escape, escapeLen); > | ^ > workdir/UnpackedTarball/firebird/src/jrd/Collation.cpp:736:2: note: in instantiation of member function '(anonymous namespace)::CollationImpl<(anonymous namespace)::StartsMatcher<unsigned char, Jrd::NullStrConverter>, (anonymous namespace)::ContainsMatcher<unsigned char, Jrd::UpcaseConverter<>>, (anonymous namespace)::LikeMatcher<unsigned char>, Firebird::SimilarToMatcher<unsigned char>, Firebird::SubstringSimilarMatcher<unsigned char>, (anonymous namespace)::MatchesMatcher<unsigned char>, (anonymous namespace)::SleuthMatcher<unsigned char>>::similarTo' requested here > 736 | CollationImpl(TTYPE_ID a_type, texttype* a_tt, CharSet* a_cs) > | ^ > workdir/UnpackedTarball/firebird/src/jrd/Collation.cpp:843:28: note: in instantiation of member function '(anonymous namespace)::CollationImpl<(anonymous namespace)::StartsMatcher<unsigned char, Jrd::NullStrConverter>, (anonymous namespace)::ContainsMatcher<unsigned char, Jrd::UpcaseConverter<>>, (anonymous namespace)::LikeMatcher<unsigned char>, Firebird::SimilarToMatcher<unsigned char>, Firebird::SubstringSimilarMatcher<unsigned char>, (anonymous namespace)::MatchesMatcher<unsigned char>, (anonymous namespace)::SleuthMatcher<unsigned char>>::CollationImpl' requested here > 843 | return FB_NEW_POOL(pool) DirectImpl(id, tt, cs); > | ^ > workdir/UnpackedTarball/firebird/src/jrd/Collation.cpp:862:11: note: in instantiation of function template specialization '(anonymous namespace)::newCollation<unsigned char>' requested here > 862 | return newCollation<UCHAR>(pool, id, tt, cs); > | ^ Change-Id: I0af4752b04020e978ea4b339ff21688302c63ef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162230 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
11 lines
310 B
Diff
11 lines
310 B
Diff
--- src/jrd/SimilarToMatcher.h
|
|
+++ src/jrd/SimilarToMatcher.h
|
|
@@ -1455,7 +1455,7 @@
|
|
gds__log("%d, %s", state, debugText.c_str());
|
|
#endif
|
|
|
|
-#define ENCODE_OP_STATE(op, state) ((op) | (state))
|
|
+#define ENCODE_OP_STATE(op, state) (+(op) | (state))
|
|
|
|
// Go directly to op and state with a single switch.
|
|
|