bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] grep: add --warnings={always,never,auto}.


From: Paolo Bonzini
Subject: Re: [PATCH 1/3] grep: add --warnings={always,never,auto}.
Date: Tue, 31 Aug 2010 09:13:58 +0200

On Mon, Aug 30, 2010 at 21:33, Paul Eggert <address@hidden> wrote:
> On 08/30/10 00:47, Paolo Bonzini wrote:
>> It's true that the GNU coding standards say "please don't make the
>> behavior of the program depend on the type of output device it is used
>> with".  On the other hand they also say "Compatibility requires certain
>> programs to depend on the type of output device."
>
> But in this case we're talking about new behavior.  No other grep
> implementation outputs warnings for dubious-but-POSIXLY-correct
> patterns, right?  So there's no issue about compatibility with
> other greps.

It's about compatibility with the generic principles set by POSIX.

> How about this idea instead?  If POSIXLY_CORRECT is set, output
> no warnings and behave as grep has done for ages.  Otherwise,
> if a dubious regular expression is found, output a diagnostic and
> exit with status 2.

No, I totally don't like this.  -Werror is not the default in GCC, and
for a reason.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]