Re: manywarnings and -f options

2011-12-03 Thread Bruno Haible
Eric Blake wrote: > > Should gl_MANYWARN_ALL_GCC be adding some gcc -f options? For example, > > at least gcc 4.3.4 -Wdisabled-optimization would emit a warning that > > several other -W warnings are useless without -funit-at-a-time also in > > place (see coreutils commit 5e361387d). Also, accord

Re: spurious message about include files from `bootstrap' script

2011-12-03 Thread Bruno Haible
Hi Stefano, > You may need to add #include directives for the following .h files. > #include > ... [SNIP] > #include > #include > /* Include only after all system include files. */ > GPL > License > #include "acl.h" > #include "alignof.h" > # ... [SNIP

Re: [PATCH 1/4] Split the HOST_NAME_MAX detection into a separate m4 macro

2011-12-03 Thread Bruno Haible
Ben Walton wrote: > The sethostname module will rely on this code too, so make it a > separate function. Thanks, I'm applying this patch, tweaking the ChangeLog entry to contain a one-line summary and tweaking the git commit message to contain the ChangeLog entry. And this trivial whitespace+comm

Re: spurious message about include files from `bootstrap' script

2011-12-03 Thread Jim Meyering
Bruno Haible wrote: > Hi Stefano, >> You may need to add #include directives for the following .h files. >> #include >> ... [SNIP] >> #include >> #include >> /* Include only after all system include files. */ >> GPL >> License >> #include "acl.h" >> #includ

Re: [PATCH 2/4] Add a new sethostname module

2011-12-03 Thread Bruno Haible
Ben Walton wrote: > Define sethostname on platforms that do not provide the declaration. > Provide a function for platforms that lack it. The general handling > of the provided function is to simply return -1 and set errno to > ENOSYS. A specific handler is provided for Minix. Thanks, I'm applyi

Re: [PATCH 3/4] Integrate the sethostname module into unistd

2011-12-03 Thread Bruno Haible
Ben Walton wrote: > Ensure that sethostname is accounted for within the unistd module. Thanks, I'm applying this patch as well. > 2011-12-01 Ben Walton > > + * lib/unistd.in.h: Integrate the SETHOSTNAME preprocessor handling > + into the unistd.h header. > + * m4/unistd_h.m4: S

Re: [PATCH 4/4] Add a test suite for the sethostname module

2011-12-03 Thread Bruno Haible
Ben Walton wrote: > Provide a module that tests the functionality of sethostname(). Thanks, I'm applying this as well. > Signed-off-by: Ben Walton > --- > ChangeLog |6 ++ > modules/sethostname-tests | 13 + > tests/test-sethostname.c | 117 > +++

Re: spurious message about include files from `bootstrap' script

2011-12-03 Thread Bruno Haible
Hi Jim, > Bruno, what do you think about making gnulib-tool warn about > that syntax error? You can not anticipate all kinds of typos that can occur. Similar things would have happened if someone wrote Licence: instead of License: IMO warnings that rely on heuristics belong more into 'syn

Re: [PATCH 4/4] Add a test suite for the sethostname module

2011-12-03 Thread Bruno Haible
Ben Walton wrote: > + int rcg, rcs, i; I'm getting a warning test-sethostname.c: In function ‘main’: test-sethostname.c:52:7: warning: unused variable ‘rcg’ [-Wunused-variable] The fix is obvious. 2011-12-03 Bruno Haible sethostname tests: Avoid a gcc warning. * tests/test

Re: [PATCH 4/4] Add a test suite for the sethostname module

2011-12-03 Thread Bruno Haible
Ben Walton wrote: > +#if !HAVE_GETEUID > +# define geteuid() ((uid_t) -1) > +#endif On mingw, I'm getting a compilation error: test-sethostname.c: In function `main': test-sethostname.c:58: error: `uid_t' undeclared (first use in this function) test-sethostname.c:58: error: (Each undeclared ident

Re: spurious message about include files from `bootstrap' script

2011-12-03 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim, > >> Bruno, what do you think about making gnulib-tool warn about >> that syntax error? > > You can not anticipate all kinds of typos that can occur. Similar things > would have happened if someone wrote > > Licence: > > instead of > > License: > > IMO warnings th

Re: [PATCH 4/4] Add a test suite for the sethostname module

2011-12-03 Thread Bruno Haible
Ben Walton wrote: > + ASSERT(gethostname (origname, sizeof (origname)) == 0); On mingw, I'm seeing a warning and link error: test-sethostname.c: In function `main': test-sethostname.c:62: warning: implicit declaration of function `gethostname' ... test-sethostname.o: In function `main': /home/br

Re: spurious message about include files from `bootstrap' script

2011-12-03 Thread Bruno Haible
Jim Meyering wrote: > How about diagnosing a missing License: when > the module is not a -test one? Neat idea. This one can be implemented without a heuristic. Done as follows: 2011-12-03 Bruno Haible gnulib-tool: Verify that the License field is present and non-empty. * gnul

arpg-help: Warning with NetBSD and amd64.

2011-12-03 Thread Mats Erik Andersson
Dear all, I observe a warning for NetBSD 5.1 on amd64, a warning which is absent for i386. Its effect is to disable two assertion statements. assert (num_entries <= SIZE_MAX / sizeof (struct hol_entry)); CC argp-help.o argp-help.c: In function 'make_hol': argp-help.c:467: warning: compar

Re: manywarnings and -f options

2011-12-03 Thread Simon Josefsson
Eric Blake writes: > On 12/02/2011 11:05 AM, Eric Blake wrote: >> Should gl_MANYWARN_ALL_GCC be adding some gcc -f options? For example, >> at least gcc 4.3.4 -Wdisabled-optimization would emit a warning that >> several other -W warnings are useless without -funit-at-a-time also in >> place (see

-Wvla vs dcnpgettext_expr's VLA decl

2011-12-03 Thread Jim Meyering
Hi Bruno, This is in the context of manywarnings, so I'll write to bug-gnulib, of course, you're welcome to add bug-gettext, if desired. I tried enabling -Wvla for coreutils and found that it provoked hundreds of warnings, all due to this: ../lib/gettext.h:262:3: error: variable length array

Re: arpg-help: Warning with NetBSD and amd64.

2011-12-03 Thread Paul Eggert
On 12/03/11 07:35, Mats Erik Andersson wrote: > argp-help.c:467: warning: comparison is always true due to limited range of > data type Thanks, but in general we ignore warnings like that, since they're almost always (as in this case) false alarms when they appear in gnulib code. Come to think o

Re: -Wvla vs dcnpgettext_expr's VLA decl

2011-12-03 Thread Bruno Haible
Hi Jim, > I tried enabling -Wvla for coreutils and found that it provoked hundreds > of warnings, all due to this: > > ../lib/gettext.h:262:3: error: variable length array 'msg_ctxt_id'\ > is used [-Werror=vla] > > That comes from this inline function from gettext.h: > > static cons

Re: spurious message about include files from `bootstrap' script

2011-12-03 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> How about diagnosing a missing License: when >> the module is not a -test one? > > Neat idea. This one can be implemented without a heuristic. Done as follows: Thanks! > > 2011-12-03 Bruno Haible > > gnulib-tool: Verify that the License field i

Re: manywarnings and -f options

2011-12-03 Thread Eric Blake
On 12/03/2011 09:00 AM, Simon Josefsson wrote: > What does -funit-at-a-time really do? My gcc 4.4 manual says: > > `-funit-at-a-time' > This option is left for compatibility reasons. `-funit-at-a-time' > has no effect, while `-fno-unit-at-a-time' implies > `-fno-toplevel-reorder' a

Re: -Wvla vs dcnpgettext_expr's VLA decl

2011-12-03 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim, > >> I tried enabling -Wvla for coreutils and found that it provoked hundreds >> of warnings, all due to this: >> >> ../lib/gettext.h:262:3: error: variable length array 'msg_ctxt_id'\ >> is used [-Werror=vla] >> >> That comes from this inline function from ge

Re: manywarnings and -f options

2011-12-03 Thread Jim Meyering
Eric Blake wrote: > On 12/03/2011 09:00 AM, Simon Josefsson wrote: >> What does -funit-at-a-time really do? My gcc 4.4 manual says: >> >> `-funit-at-a-time' >> This option is left for compatibility reasons. `-funit-at-a-time' >> has no effect, while `-fno-unit-at-a-time' implies >>