Re: [PATCH] wchar: avoid a linker error during configure on AIX

2020-10-18 Thread CHIGOT, CLEMENT
Hi  > I can't reproduce the problem on the AIX 7.1 and 7.2 systems I have > access to. Anyway... > Your patch is a workaround to a workaround. Worse, I can't verify that > your patch does not break the original workaround (on glibc systems of > around 2009). Therefore I find it better to just not

new module 'ssfmalloc'

2020-10-18 Thread Bruno Haible
This patch adds a new module 'ssfmalloc', a "simple and straight-forward memory allocation" facility. I need this as an auxiliary module for the partial function module, which is still work in progress. It's similar to a general-purpose malloc, with three differences that the usual malloc doesn't

Re: [PATCH] wchar: avoid a linker error during configure on AIX

2020-10-18 Thread Bruno Haible
Hi, CHIGOT, CLEMENT wrote: > Configure programs aiming to check if wchar.h uses 'inline' correctly > raises a linker error on AIX because there are redefining wcstod to an > undeclaration function. However, in the latest AIX version (at least > 7.1.5 and after 7.2.3), wcstod() is used to declare a

time: Fix warning about asctime when asctime is not used

2020-10-18 Thread Bruno Haible
Building a testdir of all of gnulib with clang, I get 696 of the kind ./time.h:858:18: warning: asctime can overrun buffers in some cases - better use strftime (or even sprintf) instead [-Wuser-defined-warnings] This patch fixes it. 2020-10-18 Bruno Haible time: Fix warning about

Re: Non-opaque hamt type?

2020-10-18 Thread Marc Nieper-Wißkirchen
Okay, if you find the latter protocol better anyway, I will switch to this protocol, and hamts will be stack-allocated (just two words) and passed by value. Thanks, Marc Am So., 18. Okt. 2020 um 19:58 Uhr schrieb Bruno Haible : > > Marc Nieper-Wißkirchen wrote: > > The existing protocol is as fo

Re: Non-opaque hamt type?

2020-10-18 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote: > The existing protocol is as follows: > > Hamt_entry *e = hamt_entry (...); > Hamt_entry *p = e; > Hamt *new_hamt = hamt_insert (old_hamt, &p); > if (old_hamt == new_hamt) > { > /* The element hasn't been insert as an equivalent element has already > been in t

Re: Non-opaque hamt type?

2020-10-18 Thread Marc Nieper-Wißkirchen
Am So., 18. Okt. 2020 um 16:39 Uhr schrieb Bruno Haible : > > Hi Marc, > > > At the moment, the header file exposes an opaque struct Hamt and > > communication with the code happens through (stack-allocated) pointers > > to a Hamt. In the implementation, however, each Hamt just consists of > > two

Re: Non-opaque hamt type?

2020-10-18 Thread Bruno Haible
Hi Marc, > At the moment, the header file exposes an opaque struct Hamt and > communication with the code happens through (stack-allocated) pointers > to a Hamt. In the implementation, however, each Hamt just consists of > two pointers (a pointer to a function table and a pointer to the > root), s

Re: 'const' function attribute

2020-10-18 Thread Bruno Haible
Paul Eggert wrote: > > To me, this is a pointless warning. Would you agree that a bug report to > > the GCC people makes sense? > > Yes and no. Theoretically, it makes sense that 'const' could apply to static > functions too. However the practical argument is weak. Programmers shouldn't > be >

obstack: Fix a clang warning

2020-10-18 Thread Bruno Haible
Building a gnulib testdir for module 'obstack' with clang, I get this warning: ../../gllib/obstack.c:351:31: warning: incompatible pointer types initializing 'void (*)(void) __attribute__((noreturn))' with an expression of type 'void (void)' [-Wincompatible-pointer-types] __attribute_noreturn__