This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
floot_log2() - two functions with the same name in GCC.
- From: Marcin Dalecki <martin at dalecki dot de>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Sun, 22 Jan 2006 04:00:08 +0100
- Subject: floot_log2() - two functions with the same name in GCC.
Looking at gcc/toplev.h and gcc/toplev.c I have found the following
two variants of the same
function once in the header and once in the definition fine.
extern inline int
floor_log2 (unsigned HOST_WIDE_INT x)
{
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
}
and again the same function:
int
floor_log2 (unsigned HOST_WIDE_INT x)
{
int t = 0;
if (x == 0)
return -1;
#ifdef CLZ_HWI
t = HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x);
#else
....
#endif
return t;
}
At first glace it seems that the .c variants represents hand
optimized C code, which get's never
called. I'm quite convinced that it should be just removed, since
it's never used
due to overschadowing by the .h variant