Re: Clang-built Gawk 5.2.1 regex oddity

2023-01-12 Thread Sam James
> On 5 Jan 2023, at 23:06, Arsen Arsenović wrote: > > Hi, > > Paul Eggert writes: > >> This is a serious bug in Clang: it generates incorrect machine code. >> >> The code that Clang generates for the following (gawk/support/dfa.c lines >> 1141-1143): >> >>((dfa->syntax.dfaopts & DFA_CO

Re: Clang-built Gawk 5.2.1 regex oddity

2023-01-06 Thread arnold
Thanks for the update. Paul, let's leave dfa.c as is, with the modified code. It's much easier to read anyway. Thanks, Arnold Arsen Arsenović wrote: > Hi, > > Paul Eggert writes: > > > This is a serious bug in Clang: it generates incorrect machine code. > > > > The code that Clang generates

Re: Clang-built Gawk 5.2.1 regex oddity

2023-01-05 Thread Arsen Arsenović
Hi, Paul Eggert writes: > This is a serious bug in Clang: it generates incorrect machine code. > > The code that Clang generates for the following (gawk/support/dfa.c lines > 1141-1143): > > ((dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR > ? dfaerror : dfawarn) > (_("charact

Re: Clang-built Gawk 5.2.1 regex oddity

2023-01-02 Thread Sam James
> On 3 Jan 2023, at 02:14, Sam James wrote: > > > >> On 2 Jan 2023, at 06:10, Paul Eggert wrote: >> >> This is a serious bug in Clang: it generates incorrect machine code. >> >> [snip] >> >> My guess is that Clang got confused because dfaerror is declared _Noreturn, >> so Clang mistakenl

Re: Clang-built Gawk 5.2.1 regex oddity

2023-01-02 Thread Sam James
> On 2 Jan 2023, at 06:10, Paul Eggert wrote: > > This is a serious bug in Clang: it generates incorrect machine code. > > [snip] > > My guess is that Clang got confused because dfaerror is declared _Noreturn, > so Clang mistakenly assumed that dfawarn is also _Noreturn, which it is not. >

Re: Clang-built Gawk 5.2.1 regex oddity

2023-01-01 Thread Paul Eggert
This is a serious bug in Clang: it generates incorrect machine code. The code that Clang generates for the following (gawk/support/dfa.c lines 1141-1143): ((dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR ? dfaerror : dfawarn) (_("character class syntax is [[:space:]], not [:

Re: Clang-built Gawk 5.2.1 regex oddity

2023-01-01 Thread arnold
Hi Sam, Thanks for the further info. Looking at both bits of dfa.c code, I don't see how either can be undefined behavior. In any case, dfa.c is copied directly from GNULIB, so I am cc-ing bug-gnulib. Paul & Jim, for background, please see the thread at https://lists.gnu.org/archive/html/bug-ga