On Mon, Aug 30, 2010 at 21:33, Paul Eggert <[email protected]> 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
