test-getgroups.c:stringop-overflow warning on newer GCC

2020-12-08 Thread Bernhard Voelker
Newer GCC complains about this test: $ make test-getgroups.o V=1 depbase=`echo test-getgroups.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. -DIN_FINDUTILS_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../gl/lib -I./.. \ /gl/lib -g -O2 -MT test-getgroups.o

Re: test-getgroups.c:stringop-overflow warning on newer GCC

2021-01-01 Thread Bruno Haible
Hi Berny, Bernhard Voelker wrote in : > Newer GCC complains about this test: > > $ make test-getgroups.o V=1 > depbase=`echo test-getgroups.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ > gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I

Re: test-getgroups.c:stringop-overflow warning on newer GCC

2021-01-01 Thread Bernhard Voelker
Hi Bruno, On 1/1/21 1:56 PM, Bruno Haible wrote: > Hi Berny, > > Bernhard Voelker wrote in > : >> Newer GCC complains about this test: >> >> $ make test-getgroups.o V=1 >> depbase=`echo test-getgroups.o | sed 's|[^/]*$|.deps

Re: test-getgroups.c:stringop-overflow warning on newer GCC

2021-01-01 Thread Bruno Haible
Hi Berny, > So it may be an issue with the 10.2.1 version > ... > I'm not sure how to proceed from here. The most interesting piece of information is the rationale of this warning (i.e. more precisely why the warning is enabled by default). Maybe it can be found in the set of patches of this GCC

Re: test-getgroups.c:stringop-overflow warning on newer GCC

2021-01-01 Thread Bernhard Voelker
Hi Bruno, On 1/2/21 2:59 AM, Bruno Haible wrote: > Hi Berny, > >> So it may be an issue with the 10.2.1 version >> ... >> I'm not sure how to proceed from here. > > The most interesting piece of information is the rationale of this > warning (i.e. more precisely why the warning is enabled by def

Re: test-getgroups.c:stringop-overflow warning on newer GCC

2021-01-01 Thread Paul Eggert
On 1/1/21 6:30 PM, Bernhard Voelker wrote: As I see the same on Fedora, the issue seems to be upstream, doesn't it? I see the problem on Fedora 33 as well. It doesn't appear to be a GCC bug. unistd.h's declaration expands to this: extern int getgroups (int __size, __gid_t __list[]) __attribu

Re: test-getgroups.c:stringop-overflow warning on newer GCC

2021-01-02 Thread Bruno Haible
Paul Eggert wrote: > I see the problem on Fedora 33 as well. It doesn't appear to be a GCC > bug. unistd.h's declaration expands to this: > > extern int getgroups (int __size, __gid_t __list[]) __attribute__ > ((__nothrow__, __leaf__)) __attribute__ ((__access__ (__write_only__, 2, > 1))); > >

Re: test-getgroups.c:stringop-overflow warning on newer GCC

2021-01-02 Thread Bernhard Voelker
On 1/2/21 1:51 PM, Bruno Haible wrote: > 2021-01-02 Bruno Haible > > getgroups test: Avoid warning with glibc >= 2.32 and gcc >= 10. Thanks, works. Have a nice day, Berny