Re: Apple LLVM 10 and `__fallthrough__`

2023-02-26 Thread Jeffrey Walton
On Sun, Feb 26, 2023 at 10:08 PM Alexei Podtelezhnikov wrote: > > On Sun, Feb 26, 2023 at 7:08 PM Bruno Haible wrote: > > > > Alexei Podtelezhnikov wrote: > > > -# elif (__GNUC__ >= 7) || (__clang_major__ >= 10) > > > +# elif ((__GNUC__ >= 7) \ > > > +|| (defined __apple_build_version__ \

Re: Apple LLVM 10 and `__fallthrough__`

2023-02-26 Thread Alexei Podtelezhnikov
On Sun, Feb 26, 2023 at 7:08 PM Bruno Haible wrote: > > Alexei Podtelezhnikov wrote: > > -# elif (__GNUC__ >= 7) || (__clang_major__ >= 10) > > +# elif ((__GNUC__ >= 7) \ > > +|| (defined __apple_build_version__ \ > > +? __apple_build_version__ >= 1400 \ > > +:

Re: Apple LLVM 10 and `__fallthrough__`

2023-02-26 Thread Jeffrey Walton
On Sun, Feb 26, 2023 at 6:36 PM Alexei Podtelezhnikov wrote: > [...] > Would it perhaps be better if clang used [[fallthrough]] instead of > __attribute__((fallthrough))? They have supported [[fallthrough]] > since at least 3.5.0 circa 2014. In this particular case they are > ahead of GCC and to

Re: Apple LLVM 10 and `__fallthrough__`

2023-02-26 Thread Bruno Haible
Alexei Podtelezhnikov wrote: > -# elif (__GNUC__ >= 7) || (__clang_major__ >= 10) > +# elif ((__GNUC__ >= 7) \ > +|| (defined __apple_build_version__ \ > +? __apple_build_version__ >= 1400 \ > +: __clang_major__ >= 10)) > > Wiki suggests __apple_build_version__

Re: Apple LLVM 10 and `__fallthrough__`

2023-02-26 Thread Alexei Podtelezhnikov
-# elif (__GNUC__ >= 7) || (__clang_major__ >= 10) +# elif ((__GNUC__ >= 7) \ +|| (defined __apple_build_version__ \ +? __apple_build_version__ >= 1400 \ +: __clang_major__ >= 10)) Wiki suggests __apple_build_version__ >= 1200 https://en.wikipedia.org/wiki/X

Re: Take account of splitting option in gendocs.sh

2023-02-26 Thread Bruno Haible
Gavin Smith wrote: > I notice that this script also still supports texi2html, which is no > longer developed. I could produce a patch to remove this support if > it was very likely that nobody was relying on it. A web search on www.gnu.org shows that the manuals of at least the following packages

Take account of splitting option in gendocs.sh

2023-02-26 Thread Gavin Smith
The patch at the bottom of this mail makes gendocs.sh take account of the --split option. Texinfo uses this as one of its manuals (texi2any_internals) uses --split=chapter for the HTML output. Up to this point we have been getting around this problem by using a custom gendocs template. It appear

Re: Updating in glibc and gnulib

2023-02-26 Thread Bruno Haible
Florian Weimer wrote: > Does gnulib still override unconditionally? Gnulib does not override , and never did. That is, when a package that uses Gnulib does #include it will get the of the system (from glibc, *BSD, Cygwin, etc.). Only when a package uses the compiler option "-I /usr/include/

Re: Apple LLVM 10 and `__fallthrough__`

2023-02-26 Thread Werner LEMBERG
> I haven't been able to find out precisely which versions produce the > warning, by looking at https://github.com/apple/llvm-project . So, > I'm applying the conservative patch: [...] Thanks! Maybe other Apple users chime in so that the test can be refined if necessary. Werner

Re: FYI: announce-gen: add more info to the auto-generated announce template

2023-02-26 Thread Jim Meyering
On Sat, Feb 25, 2023 at 11:56 PM Bruno Haible wrote: > Jim Meyering wrote: > > from coreutils-9.2 or openBSD's cksum since 2007. > > It's the first time I see OpenBSD spelled this way. Why not use an > uppercase 'O', like they do themselves [1] ? Thanks. Corrected.

Re: Cannot build fstat.c on mingw

2023-02-26 Thread Bruno Haible
Reuben Thomas wrote: > I get an error with compiling: > > In file included from fstat.c:52: > stat-time.h: In function ‘get_stat_atime_ns’: > stat-time.h:52:43: error: invalid use of undefined type ‘const struct > _stati64’ >52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) > > and lo

Support FALLTHROUGH macro better in glibc+clang

2023-02-26 Thread Bruno Haible
Looking through the FALLTHROUGH definitions in gnulib, it appears that it has the assumption built-in that glibc will only be built by GCC. Nowadays people are alternatively using (non-Apple) clang to build glibc, see https://www.collabora.com/news-and-blog/blog/2021/09/30/a-tale-of-two-toolchains

Cannot build fstat.c on mingw

2023-02-26 Thread Reuben Thomas
I get an error with compiling: In file included from fstat.c:52: stat-time.h: In function ‘get_stat_atime_ns’: stat-time.h:52:43: error: invalid use of undefined type ‘const struct _stati64’ 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) and lots more the same. I came across this w

Re: Apple LLVM 10 and `__fallthrough__`

2023-02-26 Thread Bruno Haible
Hi Werner, > In `lib/dfa.c` I see > > ``` > ... > # elif (__GNUC__ >= 7) || (__clang_major__ >= 10) > # define FALLTHROUGH __attribute__ ((__fallthrough__)) > ... > ``` > > I now wonder whether it would be better to have a special case for > Apple LLVM to avoid this warning. Indeed, it's not t

Re: lib/fts.c: return when malloc failed

2023-02-26 Thread Pádraig Brady
On 26/02/2023 14:46, ChuanGang Jiang wrote: Hi,‘rm’ of coreutils was terminated with signal SIGSEGV, Segmentation fault. Here is the backtrace with gdb. Core was generated by `/usr/bin/rm -rf test1/test2/'. Program terminated with signal SIGSEGV, Segmentation fault. #0 cycle_check (state=0x0, s

lib/fts.c: return when malloc failed

2023-02-26 Thread ChuanGang Jiang
Hi,‘rm’ of coreutils was terminated with signal SIGSEGV, Segmentation fault. Here is the backtrace with gdb. Core was generated by `/usr/bin/rm -rf test1/test2/'. Program terminated with signal SIGSEGV, Segmentation fault. #0 cycle_check (state=0x0, sb=sb@entry=0x56296ac29e00) at ../lib/cycle-ch