Subject: Re: bug#51504: grep not building for me with gcc 11.2

From: Paul Eggert <[email-masked]>
Date: Sat, 30 Oct 2021 17:41:13 -0700

On 10/30/21 01:40, Duncan Roe wrote:
> To stop other folks running into this, configure.ac needs to be fixed to not
> --enable-gcc-warnings of its own accord.

configure.ac enables GCC warnings by default only you're building from a 
Git repository. If you had built from the latest grep release tarball 
you wouldn't have run into this problem.

This should be documented better in README-hacking. I installed a patch 
to GNU grep to try to do that. See:

https://git.savannah.gnu.org/cgit/grep.git/commit/?id=1ba972edec7867c1592083363dc9fadfebf77e2e

> Should I report these to the gcc team?

I wouldn't bother. The grep sources are tuned for --enable-gcc-warnings 
with -O2 and no other optimization-relevant options.