https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112789
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #13 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to gnzlbg from comment #8) > Oh! Sorry! I see this was resolved as WONTFIX. > > Does that mean that GCC, in contrast with the LLVM community - which is > always super helpful and friendly when it comes to trying to enable their > toolchains to compile SW developed with GNU - intentionally does not want to > enable the GNU toolchains to compile SW developed with clang? Because Clang developers actively claim to support GNU extensions, while GCC never has such a policy to support other extensions. When an extension is considered useful we port it, but in this case we already have __builtin_ctzg as all others have mentioned. And Clang developers also reject GNU extensions if they consider the extension "wrong", despite they make such a "compatibility" claim. In the future (when C23 is widely adopted) people should just use stdc_trailing_zerosus instead of directly invoking __builtin_ctz{g,s} of whatever compiler.