https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112789

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So just for future reference __builtin_c[lt]zs is for short.

But with GCC 14 (trunk) added __builtin_ct[lt]g, there is no need to add
__builtin_c[lt]zs to GCC.

You could just do:

#if __has_builtin(__builtin_ctzg) && !__has_builtin(__builtin_ctzs)
#define ctzs(a) __builtin_ctzg((short)a)
#elif __has_builtin(__builtin_ctzs)
#define ctzs(a) __builtin_ctzs((short)a)
#else
#error implement fall back for not both cases
#endif

Reply via email to