]> Gentwo Git Trees - linux/.git/commitdiff
tools/nolibc: use __fallthrough__ rather than fallthrough
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 24 Sep 2025 14:20:53 +0000 (16:20 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Wed, 29 Oct 2025 15:29:15 +0000 (16:29 +0100)
Use the version of the attribute with underscores to avoid issues if
fallthrough has been defined by another header file already.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/compiler.h

index 369cfb5a0e78f4ae1e1a2cac4077024b4e8ba225..87090bbc53e03813519d5ef0709a6102af801391 100644 (file)
@@ -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) */