Hi Paul,

Paul Eggert wrote:
> > Thanks; I installed the attached somewhat fancier patch into Gnulib.
> 
> ... and then installed the attach further patch to fix a thinko in the 
> previously-mentioned one.

These changes have the effect that even on glibc systems, gnulib's regex
code is now used instead of glibc's. This is what happens at configure
time:

configure:29480: checking for working re_compile_pattern
configure:29802: clang 
-fsanitize=address,undefined,signed-integer-overflow,shift,integer-divide-by-zero
 -fno-sanitize-recover=undefined -o conftest -O0 -fno-omit-frame-pointer -ggdb 
-Wall -Wthread-safety conftest.c  >&5
conftest.c:207:15: error: "RE_SYNTAX_EMACS does not match Emacs behavior"
  207 |             # error "RE_SYNTAX_EMACS does not match Emacs behavior"
      |               ^

And, in fact, this is not necessary, because

  - Application code sees the gnulib regex.h (due to -I options).
    Things would be different if the 'regex' module would be using a
    regex.in.h from which a regex.h is conditionally generated. But
    the way things are, gnulib regex.h is used unconditionally.

  - Nothing in the reg*.c files uses RE_SYNTAX_EMACS.

It is just added baggage for applications.

I therefore suggest to revert the changes to m4/regex.m4.

Bruno




Reply via email to