This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
mismatch in parameter of builtin_ffs?
- From: Erven ROHOU <erven dot rohou at st dot com>
- To: GCC mailing list <gcc at gcc dot gnu dot org>
- Date: Fri, 27 Apr 2007 16:23:35 +0200
- Subject: 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.