From a368a60eb81ea6e3264e0c8c2cb12f2ee7f0585d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 21 May 2022 01:38:39 -0700 Subject: grep: assume POSIX.1-2017 for [:space:] * src/dfasearch.c (dfawarn): Always call dfaerror now, regardless of POSIXLY_CORRECT. * tests/warn-char-classes: Omit test of POSIX.1-2008 behavior, since POSIX.1-2017 allows the GNU behavior. --- src/dfasearch.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/dfasearch.c b/src/dfasearch.c index 744b8f81..8f48296a 100644 --- a/src/dfasearch.c +++ b/src/dfasearch.c @@ -53,14 +53,10 @@ dfaerror (char const *mesg) die (EXIT_TROUBLE, 0, "%s", mesg); } -/* For now, the sole dfawarn-eliciting condition (use of a regexp - like '[:lower:]') is unequivocally an error, so treat it as such, - when possible. */ -void +_Noreturn void dfawarn (char const *mesg) { - if (!getenv ("POSIXLY_CORRECT")) - dfaerror (mesg); + dfaerror (mesg); } /* If the DFA turns out to have some set of fixed strings one of -- cgit v1.2.1