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]

Re: speeding up parts of gcc by using ffs


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


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