This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mismatch in parameter of builtin_ffs?


Hello,

Looking at builtins, I think I have found something inconsistent.
__builtin_ffs is defined in the documentation as taking an unsigned int parameter:


Built-in Function: int __builtin_ffs (unsigned int x)

However in the file builtins.def, it is defined as:

DEF_EXT_LIB_BUILTIN (BUILT_IN_FFS, "ffs", BT_FN_INT_INT, ATTR_CONST_NOTHROW_LIST)

that is: it takes an int.

I think it should be BT_FN_INT_UINT. (Other functions like clz, parity, popcount are defined with unsigned int.)
Unless I am missing something...


--
Erven.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]