GNU bug report logs - #44535
grep-3.6 released [stable]

Previous Next

Package: grep;

Reported by: Andreas Schwab <schwab <at> suse.de>

Date: Mon, 9 Nov 2020 16:14:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 44535 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Andreas Schwab <schwab <at> suse.de>, 44535 <at> debbugs.gnu.org
Subject: Re: bug#44535: grep-3.6 released [stable]
Date: Fri, 13 Nov 2020 10:27:03 -0800
On Thu, Nov 12, 2020 at 11:40 PM Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> On 11/9/20 8:12 AM, Andreas Schwab wrote:
> > grep 3.6 fails to build:
> >
> > test-nl_langinfo-mt.c: In function 'threadN_func':
> > test-nl_langinfo-mt.c:185:1: error: no return statement in function returning non-void [-Werror=return-type]
> >    185 | }
> >        | ^
> > cc1: some warnings being treated as errors
> > make[4]: *** [Makefile:4221: test-nl_langinfo-mt.o] Error 1
>
> We have dueling compilers here, as Sun C complains if the return statements are
> present[1], whereas gcc -Wreturn-type complains if they're absent. Since the
> return statements are clearly bogus and unnecessary I'm inclined to continue to
> omit them.
>
> > https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:Factory/grep/f/x86_64
>
> This says you're configuring with CFLAGS='... -Werror=return-type ...'. If you
> omit the "-Werror=return-type" option the problem should go away. For 'grep',
> that option is more trouble than it's worth. (Perhaps someone should file a GCC
> bug report....)
>
> For the recommended set of warning options for compiling 'grep', you can use
> './configure --enable-gcc-warnings' instead.
>
> [1]
> https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=bd90572c031a25e559907ae0c2b9fd3aa632893b

This led me to realize that grep had not enabled warnings on its
compilation of gnulib-tests/.
I've begun to fix that, which has including filing this gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97817




This bug report was last modified 4 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.