[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39678: warn about stray backslashes
From: |
Paul Eggert |
Subject: |
bug#39678: warn about stray backslashes |
Date: |
Tue, 24 May 2022 17:52:48 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 |
On 5/23/22 13:03, Paul Eggert wrote:
it makes sense to warn about EREs like '(*)', '(*a)', '(+)', '(+a)',
'({1})', '({1}a)' as POSIX does not specify their behavior, their
semantics are unpredictable with GNU grep, and it's plausible that
people are making mistakes in this area.
I installed the attached to do that. As before, most of the changes were
in Gnulib's dfa module.
With all these changes, we now see behavior like this:
$ echo a | src/grep -oi '\a'
src/grep: warning: stray \ before a
which is not ideal (so I'll leave the bug report open), but at least
this gives the user a warning that the pattern is not on the up-and-up.
0001-build-update-gnulib-submodule-to-latest.patch
Description: Text Data
0002-grep-warn-about-x-etc.patch
Description: Text Data