From 0da5279533567c7b3470e550861643c0060e2f0d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 3 Jun 2022 18:46:37 -0700 Subject: [PATCH] dfa: do not warn about \] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib/dfa.c (lex): Do not warn about \], since it’s surely universally supported even though POSIX says its interpretation is undefined. --- ChangeLog | 5 +++++ lib/dfa.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5fe5e9ee23..73e7898f4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2022-06-03 Paul Eggert + dfa: do not warn about \] + * lib/dfa.c (lex): Do not warn about \], since it’s surely + universally supported even though POSIX says its interpretation + is undefined. + regex-quote: \] -> ] in EREs and BREs * build-aux/bootstrap: * build-aux/bootstrap.conf (gettext_external): diff --git a/lib/dfa.c b/lib/dfa.c index bd4c5f0582..d6652432a4 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -1563,6 +1563,9 @@ lex (struct dfa *dfa) } dfawarn (msg); } + FALLTHROUGH; + case ']': + /* Do not warn about \] as that's more trouble than it's worth. */ normal_char: dfa->lex.laststart = false; /* For multibyte character sets, folding is done in atom. Always -- 2.36.1