diff --git a/lib/dfa.c b/lib/dfa.c index a27d096f73..391c2ffbf2 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -43,6 +43,11 @@ MMU will check anyway. */ #define assume_nonnull(x) assume ((x) != NULL) +/* Pacify Clang. */ +#ifdef clang + #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical" +#endif + static bool streq (char const *a, char const *b) { @@ -1089,6 +1094,8 @@ parse_bracket_exp (struct dfa *dfa) /* Treat [x-y] as a range if x != y. */ if (wc != wc2 || wc == WEOF) { + /* Use "&" instead of "&&", as short-circuit evaluation is + not needed and might even slow things down. */ if (dfa->localeinfo.simple || (isasciidigit (c) & isasciidigit (c2))) {