This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: speeding up parts of gcc by using ffs
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, apinski at apple dot com
- Date: 08 Jan 2003 09:22:12 +0100
- Subject: Re: speeding up parts of gcc by using ffs
- References: <11CFA879-22DE-11D7-8833-000393A6D2F2@physics.uc.edu>
Andrew Pinski <pinskia@physics.uc.edu> writes:
> + extern int ffs();
Function declarators with empty parentheses are an obsolescent feature
in C99, so I think they're better to be avoided.
> +#else
> + int bit_num = 0;
> + if(valu==0)
> + return 0;
> + while((valu&1)!=0)
> + bit_num ++, valu >>= 1;
> +
> + return bit_num;
> +#endif
This looks bogus to me.
--
Falk