Re: [PATCH 1/4] localename: -Wtautological-pointer-compare

2023-01-14 Thread Paul Eggert
On 2023-01-14 03:00, Bruno Haible wrote: Is that what you are worried about? Should I work on this? No, please don't bother. I was partly confused by the situation and your email helped clear up some of it. Hope you don't mind this followup. My confusion arose partly because I am accustomed

Re: [PATCH] Define alignof_slot using _Alignof when using C11 or newer

2023-01-14 Thread Paul Eggert
On 2023-01-14 16:17, Bruno Haible wrote: What's (quasi) normative is * n3047.pdf = C23, which says in 7.21.(3) "If the specified type defines a new type or if the specified member is a bit-field, the behavior is undefined." I'm afraid this wording in n3047 is unclear. Ordinarily

Re: [PATCH v2] Define alignof_slot using _Alignof when using C11 or newer

2023-01-14 Thread Paul Eggert
On 2023-01-14 17:20, Khem Raj wrote: +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 +. + clang versions < 8.0.0 have the same bug. */ +#elif (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ + || (defi

Re: [PATCH] Define alignof_slot using _Alignof when using C11 or newer

2023-01-14 Thread Khem Raj
On Sat, Jan 14, 2023 at 4:17 PM Bruno Haible wrote: > > Khem Raj wrote: > > [2] https://reviews.llvm.org/D133574 > > Thanks for the heads-up. > > > WG14 N2350 made very clear that it is an UB having type definitions > > within "offsetof" [1]. > > [1] https://www.open-std.org/jtc1/sc22/wg14/www/doc

[PATCH v2] Define alignof_slot using _Alignof when using C11 or newer

2023-01-14 Thread Khem Raj
WG14 N2350 made very clear that it is an UB having type definitions within "offsetof" [1]. This patch enhances the implementation of macro alignof_slot to use builtin "_Alignof" to avoid undefined behavior on when using std=c11 or newer. Make exceptions for gcc < 4.9 and clang < 8 where there is bu

[PATCH] test-framework-sh: work around AIX 7.2 diff bugs

2023-01-14 Thread Paul Eggert
* tests/init.sh (compare_dev_null_): Run diff in the C locale. AIX 7.2 diff messes up in UTF-8 locales; for example, ‘printf '\360\220\200\200\n' | diff - /dev/null’ incorrectly outputs nothing and exits with status 0 when LC_ALL=en_US.UTF-8. --- ChangeLog | 8 tests/init.sh | 7 -

Re: fpending Android bug

2023-01-14 Thread Po Lu
Bruno Haible writes: > Before we make any change, we need to know what is wrong, i.e. what is > "the fpending bug on Android". You haven't said so, after I asked in > > > Please be specific: What do you mean by "not works"? Do

Re: [PATCH] Define alignof_slot using _Alignof when using C11 or newer

2023-01-14 Thread Bruno Haible
Khem Raj wrote: > [2] https://reviews.llvm.org/D133574 Thanks for the heads-up. > WG14 N2350 made very clear that it is an UB having type definitions > within "offsetof" [1]. > [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm This document is not normative; it is merely a discussio

[PATCH] Define alignof_slot using _Alignof when using C11 or newer

2023-01-14 Thread Khem Raj
WG14 N2350 made very clear that it is an UB having type definitions within "offsetof" [1]. This patch enhances the implementation of macro alignof_slot to use builtin "_Alignof" to avoid undefined behavior on when using std=c11 or newer clang 16+ has started to flag this [2] Fixes build when usin

Re: error, verror: Add tests

2023-01-14 Thread Bruno Haible
Building an m4 snapshot on FreeBSD, with GNU gettext installed, I see a link error of 'test-error', regarding the symbol 'libintl_gettext'. This patch should fix it. 2023-01-14 Bruno Haible error, verror tests: Fix link error when the package uses libintl. * modules/error-test

Re: fpending Android bug

2023-01-14 Thread Bruno Haible
I wrote: > - If you are using an Android NDK with __ANDROID_API__ being >= 23, > the function __fpending exists and is declared, and therefore the > Gnulib m4/fpending.m4 arranges to not compile fpending.c. More exactly: - If you are using an Android NDK r14b or newer, with __ANDROID_

Re: fpending Android bug

2023-01-14 Thread Bruno Haible
Hi Po Lu, > I think I now have the right fix for the fpending bug on Android. Before we make any change, we need to know what is wrong, i.e. what is "the fpending bug on Android". You haven't said so, after I asked in Please

fpending Android bug

2023-01-14 Thread Po Lu
I think I now have the right fix for the fpending bug on Android. Google is very adamant that you should not do this, however, and they make no guarantee about the layout of the structure remaining as it is in the future. diff --git a/xcompile/lib/fpending.c b/xcompile/lib/fpending.c index afa840b

Re: [PATCH 1/4] localename: -Wtautological-pointer-compare

2023-01-14 Thread Bruno Haible
Paul Eggert wrote: > > ... starts with an entry check — which is a good practice [1] > > It's a good practice in some contexts, bad in others. It's a good practice at least when - the function is non-static (and therefore the callers are not all known), - checking the parameters is fast, -

Re: [PATCH] Use xattr (Linux) in qcopy-acl.c

2023-01-14 Thread Ondrej Valousek
I see some new messages but not a single one about the ACL stuff we discussed (I know that most of it was private, but not everything) yesterday. Anyway, if it works ok for you, then fine. Zasláno z Outlooku pro Android From: Bruno Haible