Re: Support FALLTHROUGH macro better in glibc+clang

2023-03-27 Thread Bruno Haible
ince GCC started supporting __has_attribute in GCC 5. Good point. I'm thus committing this in your name: 2023-03-27 Paul Eggert Support FALLTHROUGH macro better in glibc+clang. * lib/fnmatch.c (FALLTHROUGH): Use __attribute__ ((__fallthrough__)) also in clang >= 1

Re: Support FALLTHROUGH macro better in glibc+clang

2023-03-25 Thread Paul Eggert
On 2023-03-25 14:24, Paul Eggert wrote:    # if __GNUC_PREREQ (7,0) || __glibc_has_attribute (__fallthrough__) Come to think of it this could be simplified further, to just: # if __glibc_has_attribute (__fallthrough__) since GCC started supporting __has_attribute in GCC 5.

Re: Support FALLTHROUGH macro better in glibc+clang

2023-03-25 Thread Paul Eggert
On 2023-02-26 08:43, Bruno Haible wrote: -# if __GNUC__ >= 7 +# if (__GNUC__ >= 7) || (__clang_major__ >= 10) Sorry I didn't see this earlier. Since this is protected by #ifdef _LIBC" it might be better to do this the glibc way. Something like the following, perhaps? # if __GNUC_PREREQ (

Re: Support FALLTHROUGH macro better in glibc+clang

2023-03-25 Thread Bruno Haible
Hi Paul, Any objections against this proposed patch from <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00178.html> ? > 2023-02-26 Bruno Haible > > Support FALLTHROUGH macro better in glibc+clang. > * lib/fnmatch.c (FALLTHROUGH): Use __attribute__

Support FALLTHROUGH macro better in glibc+clang

2023-02-26 Thread Bruno Haible
-toolchains-and-glibc/ https://www.collabora.com/news-and-blog/blog/2023/01/17/a-brave-new-world-building-glibc-with-llvm/ To help going in this direction, how about this patch? Paul, do you object? 2023-02-26 Bruno Haible Support FALLTHROUGH macro better in glibc+clang. * lib/fnmatch.c