* lib/dfa.c (lex): Do not warn about \] and \}, since they’re
surely universally supported even though POSIX says their
interpretation is undefined.
+2022-06-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ dfa: do not warn about \] and \}
+ * lib/dfa.c (lex): Do not warn about \] and \}, since they’re
+ surely universally supported even though POSIX says their
+ interpretation is undefined.
+
2022-06-03 Paul Eggert <eggert@cs.ucla.edu>
regex-quote: \] -> ] in EREs and BREs
}
dfawarn (msg);
}
+ FALLTHROUGH;
+ case ']': case '}':
normal_char:
dfa->lex.laststart = false;
/* For multibyte character sets, folding is done in atom. Always
merely a warning. */
DFA_CONFUSING_BRACKETS_ERROR = 1 << 2,
- /* Warn about stray backslashes before ordinary characters. */
+ /* Warn about stray backslashes before ordinary characters other
+ than ] and } which are special because even though POSIX
+ says \] and \} have undefined interpretation, platforms
+ reliably ignore those stray backlashes and warning about them
+ would likely cause more trouble than it's worth. */
DFA_STRAY_BACKSLASH_WARN = 1 << 3,
/* Warn about * appearing out of context at the start of an