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



Reply via email to