summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-05-23 12:38:42 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-05-23 12:40:26 -0700
commite7f8e8eb1fd41b308ee10741bbd8068acc1847c2 (patch)
treefd77cf49d10f23893b95c31bc8f9dc4b0bfe2cc3 /NEWS
parent42db5cc8f58620b4c9c58a91c7683279c50503f9 (diff)
downloadgrep-e7f8e8eb1fd41b308ee10741bbd8068acc1847c2.tar.gz
grep: warn about stray backslashes
This papers over a problem reported by Benno Schulenberg and Tomasz Dziendzielski <https://bugs.gnu.org/39678> involving regular expressions like \a that have unspecified behavior. * src/dfasearch.c (dfawarn): Just output a warning. Don’t exit, as DFA_CONFUSING_BRACKETS_ERROR now does that for us, and we need the ability to warn without exiting to diagnose \a etc. (GEAcompile): Use new dfa options DFA_CONFUSING_BRACKETS_ERROR and DFA_STRAY_BACKSLASH_WARN.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 38ac0353..112d85b0 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,12 @@ GNU grep NEWS -*- outline -*-
release 2.5.3 (2007), now warn that they are obsolescent and should
be replaced by grep -E and grep -F.
+ Regular expressions with stray backslashes now cause warnings, as
+ their unspecified behavior can lead to unexpected results.
+ For example, '\a' and 'a' are not always equivalent
+ <https://bugs.gnu.org/39768>. The warnings are intended as a
+ transition aid; they are likely to be errors in future releases.
+
Regular expressions like [:space:] are now errors even if
POSIXLY_CORRECT is set, since POSIX now allows the GNU behavior.