Re: bug#50098: Configuring --with-libsigsegv results in link error

2021-08-22 Thread Evan Miller
> On Aug 22, 2021, at 21:15, Bruno Haible wrote: > > You can ignore this error — which merely indicates that the POSIX threads on > macOS 10.4 are incomplete and gnulib does not work around this particular > issue — and comment out the test-pthread and test-pthread-rwlock from the >

Re: bug#50098: Configuring --with-libsigsegv results in link error

2021-08-22 Thread Bruno Haible
Evan Miller wrote: > After updating gnulib master, the "make" step now ends with the error: > > gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. > -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../gllib > -I./../gllib -Wno-error -g -O2 -MT test-pthread.o -MD -MP

snippet/unused-parameter: Mark unused module obsolete

2021-08-22 Thread Bruno Haible
Paul Eggert wrote: > >> * Remove the snippet/unused-parameter module as it's not used now. > > > > Indeed, this module is unused in gnulib. It may be used in packages that > > use gnulib; therefore I vote for marking it 'obsolete' and remove it only > > in a year or two. > > Sounds good to me

Re: bug#50098: Configuring --with-libsigsegv results in link error

2021-08-22 Thread Evan Miller
> On Aug 22, 2021, at 16:42, Paul Eggert wrote: > > On 8/22/21 4:19 AM, Evan Miller wrote: >> c-stack.c: In function 'die': >> c-stack.c:106:17: warning: implicit declaration of function 'mempcpy' >> [-Wimplicit-function-declaration] >>char *p = mempcpy (buf, progname, prognamelen); >

Re: Regression in gnulib 48ece5c3f/gcc 11

2021-08-22 Thread Bruno Haible
[CCing bug-gnulib.] Jan Engelhardt wrote in private email: > I would like to point you to https://github.com/paul-j-lucas/cdecl/issues/12 > from which I gathered that gnulib's stdlib.in.h received a change (48ece5c3f) > by you that added this part that breaks on gcc11 systems: > > > +# if

Re: gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang

2021-08-22 Thread Bruno Haible
Paul Eggert wrote: > Also, your example used C code, but this fix doesn't affect C code. So > can we assume the real problem was with C++ code? Yes. I tried the example both with C and C++. foo.cc int foo (int x) { x += 2; if

Re: bug#50098: Configuring --with-libsigsegv results in link error

2021-08-22 Thread Paul Eggert
On 8/22/21 4:19 AM, Evan Miller wrote: c-stack.c: In function 'die': c-stack.c:106:17: warning: implicit declaration of function 'mempcpy' [-Wimplicit-function-declaration] char *p = mempcpy (buf, progname, prognamelen); Evidently some dependencies were missing from the c-stack

mountlist: Use recommended syntax for _GL_UNUSED_LABEL

2021-08-22 Thread Bruno Haible
A semicolon is expected after _GL_UNUSED_LABEL, at least in C++ mode. See: foo.c int foo (int x) { x += 2; if (x & 1) goto a; b: __attribute__ ((__unused__)) { x *= 3; } a: return x; }

Re: gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang

2021-08-22 Thread Paul Eggert
On 8/22/21 1:17 PM, Bruno Haible wrote: -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) +#if (!defined __cplusplus || _GL_GNUC_PREREQ (4, 5)) || defined __clang__ I got a bit confused by the extra parentheses, thinking that somehow GCC and Clang differ with respect to C++. Perhaps remove

gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang

2021-08-22 Thread Bruno Haible
So far, _GL_UNUSED_LABEL works for GCC but not for clang. See: foo.c int foo (int x) { x += 2; if (x & 1) goto a; b: x *= 3; a: return x; } === $ clang

gnulib-common.m4: Use C2x [[maybe_unused]] when possible

2021-08-22 Thread Bruno Haible
Paul Eggert wrote: > > I'm OK with moving all _GL_UNUSED from after > > the parameter declaration to before the parameter declaration. Then > > we can continue to have > >#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED > > Yes, this sounds like a win. It's a lot simpler than my proposal. >

gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros

2021-08-22 Thread Bruno Haible
When we use the _GL_ATTRIBUTE_* macros, neither the GCC documentation nor the attribute.h comments directly apply, because of different syntax. Therefore, this patch adds documentation to these macros. 2021-08-22 Bruno Haible gnulib-common.m4: Document the gnulib-internal

Re: mkstemps is not listed alphabetically in the manual

2021-08-22 Thread Bernhard Voelker
On 8/22/21 11:54 AM, Benno Schulenberg wrote: > Hi, > > On > https://www.gnu.org/software/gnulib/manual/html_node/Glibc-stdlib_002eh.html > the entry for 'mkstemps' is out of alphabetical order. This is confusing. > > (I had downloaded the PDF of the manual, searched for mkstemps, paged up a

Re: Using C2x attributes more effectively in Gnulib

2021-08-22 Thread Bruno Haible
Paul Eggert wrote: > >> Also, draft C2x lets one write the above function without naming the > >> parameters, as follows: > >> > >> SE_SELINUX_INLINE int > >> fsetfilecon (int, char const *) > >> { errno = ENOTSUP; return -1; } > >> > >> This is nicer than [[maybe_unused]], because

Re: bug#50098: Configuring --with-libsigsegv results in link error

2021-08-22 Thread Evan Miller
> On Aug 21, 2021, at 19:46, Bruno Haible wrote: > > Run these commands: > > ./gnulib-tool --create-testdir --dir=testdir1 --single-configure c-stack > cd testdir1 > ./configure > make > make check > > If they fail, then you do need the libsigsegv library. FWIW the first step fails

mkstemps is not listed alphabetically in the manual

2021-08-22 Thread Benno Schulenberg
Hi, On https://www.gnu.org/software/gnulib/manual/html_node/Glibc-stdlib_002eh.html the entry for 'mkstemps' is out of alphabetical order. This is confusing. (I had downloaded the PDF of the manual, searched for mkstemps, paged up a bit, and then -- scrolling back down -- wondered where