Skip to contentSkip to conversation

compiler.h: Fix libc++ build now that _LIBCPP_FALLTHROUGH has gone

PATCH New James Le Cuirot 1 participant 1 message Aug 3, 2025 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compiler.h: Fix libc++ build now that _LIBCPP_FALLTHROUGH has gone

This has been dropped in favour of [[__fallthrough__]].

https://github.com/llvm/llvm-project/commit/cb43fe33b5d5084cf3b5a2723a03b692edb68018

---
 include/compiler.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/compiler.h +5 -1
index 169247a8..18718496 100644
@@ -3,7 +3,11 @@
 #else
 	#include <ciso646>
 	#ifdef _LIBCPP_VERSION
-		#define fallthrough _LIBCPP_FALLTHROUGH()
+		#ifdef _LIBCPP_FALLTHROUGH
+			#define fallthrough _LIBCPP_FALLTHROUGH()
+		#else
+			#define fallthrough [[__fallthrough__]]
+		#endif // _LIBCPP_FALLTHROUGH
 	#else
 		#ifdef __clang__
 			#define fallthrough [[clang::fallthrough]]
Signature · 1 line
2.50.1