mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-05-13 15:13:36 +00:00
dfa: work around Clang 15 bug
Problem reported by Kenton Groombridge in: https://lists.gnu.org/archive/html/bug-gawk/2022-12/msg00010.html On x86-64, Clang 15 gets confused by a call (X ? dfaerror : dfawarn) (Y) and generates the wrong code, presumably because dfaerror is _Noreturn and dfawarn is not. * lib/dfa.c (parse_bracket_exp): Reword to have one call for dfaerror, the other for dfawarn.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
||||
2023-01-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
dfa: work around Clang 15 bug
|
||||
Problem reported by Kenton Groombridge in:
|
||||
https://lists.gnu.org/archive/html/bug-gawk/2022-12/msg00010.html
|
||||
On x86-64, Clang 15 gets confused by a call (X ? dfaerror :
|
||||
dfawarn) (Y) and generates the wrong code, presumably because
|
||||
dfaerror is _Noreturn and dfawarn is not.
|
||||
* lib/dfa.c (parse_bracket_exp): Reword to have one call for
|
||||
dfaerror, the other for dfawarn.
|
||||
|
||||
2023-01-01 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
doc: Update regarding stable branches.
|
||||
|
||||
11
lib/dfa.c
11
lib/dfa.c
@@ -1138,9 +1138,14 @@ parse_bracket_exp (struct dfa *dfa)
|
||||
while ((wc = wc1, (c = c1) != ']'));
|
||||
|
||||
if (colon_warning_state == 7)
|
||||
((dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR
|
||||
? dfaerror : dfawarn)
|
||||
(_("character class syntax is [[:space:]], not [:space:]")));
|
||||
{
|
||||
char const *msg
|
||||
= _("character class syntax is [[:space:]], not [:space:]");
|
||||
if (dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR)
|
||||
dfaerror (msg);
|
||||
else
|
||||
dfawarn (msg);
|
||||
}
|
||||
|
||||
if (! known_bracket_exp)
|
||||
return BACKREF;
|
||||
|
||||
Reference in New Issue
Block a user