From 674bcfad99b6b486204f4a97beb6e3571034a05e Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Fri, 20 Sep 2024 16:08:39 -0400 Subject: Use builtin ffs also with GCC With CONFIG_DEBUG_PESSIMIZE=y (-O0) the ffs intrinsic is left as a function call, resulting in a linker error. The prefixed builtin is generally part of the "GNU C" dialect and is usable in any "GNU C" implementation, i.e. any compiler that defines __GNUC__. That includes Clang, GCC, and more. --- include/mingw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mingw.h b/include/mingw.h index 65940b40b..5a3c75ff6 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -248,7 +248,7 @@ int strverscmp(const char *s1, const char *s2); /* * strings.h */ -#if !defined(__clang__) +#if !defined(__GNUC__) int ffs(int i); #else # define ffs(i) __builtin_ffs(i) -- cgit v1.2.3-55-g6feb