[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6fff1ac0-2868-4377-b8a3-c10fe1a4c1f5@t-8ch.de>
Date: Mon, 15 Sep 2025 10:50:17 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Benjamin Berg <benjamin@...solutions.net>
Cc: linux-um@...ts.infradead.org, Willy Tarreau <w@....eu>,
linux-kselftest@...r.kernel.org, Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-kernel@...r.kernel.org, Tiwei Bie <tiwei.btw@...group.com>,
Benjamin Berg <benjamin.berg@...el.com>
Subject: Re: [PATCH 5/9] tools/nolibc: use __fallthrough__ rather than
fallthrough
On 2025-09-15 09:11:11+0200, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg@...el.com>
>
> Use the version of the attribute with underscores to avoid issues if
> fallthrough has been defined by another header file already.
Not a really big fan, but as the underscore variant is documented there
shouldn't be an issue.
Acked-by: Thomas Weißschuh <linux@...ssschuh.net>
> Signed-off-by: Benjamin Berg <benjamin.berg@...el.com>
> ---
> tools/include/nolibc/compiler.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compiler.h
> index 369cfb5a0e78..87090bbc53e0 100644
> --- a/tools/include/nolibc/compiler.h
> +++ b/tools/include/nolibc/compiler.h
> @@ -41,8 +41,8 @@
> # define __no_stack_protector __attribute__((__optimize__("-fno-stack-protector")))
> #endif /* __nolibc_has_attribute(no_stack_protector) */
>
> -#if __nolibc_has_attribute(fallthrough)
> -# define __nolibc_fallthrough do { } while (0); __attribute__((fallthrough))
> +#if __nolibc_has_attribute(__fallthrough__)
> +# define __nolibc_fallthrough do { } while (0); __attribute__((__fallthrough__))
> #else
> # define __nolibc_fallthrough do { } while (0)
> #endif /* __nolibc_has_attribute(fallthrough) */
> --
> 2.51.0
>
Powered by blists - more mailing lists