Re: floot_log2() - two functions with the same name in GCC.

2006-01-22 Thread Marcin 'Qrczak' Kowalczyk
Andrew Pinski <[EMAIL PROTECTED]> writes: > No. This is GCC "extern inline" and not C99 "extern inline". Does GCC plan to move to the C99 semantics of inline and extern inline in C? -- __("< Marcin Kowalczyk \__/ [EMAIL PROTECTED] ^^ http://qrnik.knm.org.pl/~qrczak/

Re: floot_log2() - two functions with the same name in GCC.

2006-01-22 Thread Marcin Dalecki
On 2006-01-22, at 04:35, Andrew Pinski wrote: OK. Looking closer I have just found that in gcc/toplev.c #if GCC_VERSION < 3004 ... #endif Is missing around the floor_log2() and exact_log2() functions. You are mssing the fact that the ones in the headers are declared as extern inline. Yes

Re: floot_log2() - two functions with the same name in GCC.

2006-01-21 Thread Richard Kenner
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 You need the .c variant for the cases where inlining cannot be

Re: floot_log2() - two functions with the same name in GCC.

2006-01-21 Thread Andrew Pinski
> > > On 2006-01-22, at 04:17, Andrew Pinski wrote: > > >> > >> OK. Looking closer I have just found that in gcc/toplev.c > >> > >> #if GCC_VERSION < 3004 > >> ... > >> #endif > >> > >> Is missing around the floor_log2() and exact_log2() functions. > > > > You are mssing the fact that the ones i

Re: floot_log2() - two functions with the same name in GCC.

2006-01-21 Thread Marcin Dalecki
On 2006-01-22, at 04:17, Andrew Pinski wrote: OK. Looking closer I have just found that in gcc/toplev.c #if GCC_VERSION < 3004 ... #endif Is missing around the floor_log2() and exact_log2() functions. You are mssing the fact that the ones in the headers are declared as extern inline. Yes

Re: floot_log2() - two functions with the same name in GCC.

2006-01-21 Thread Andrew Pinski
> > OK. Looking closer I have just found that in gcc/toplev.c > > #if GCC_VERSION < 3004 > ... > #endif > > Is missing around the floor_log2() and exact_log2() functions. You are mssing the fact that the ones in the headers are declared as extern inline. -- Pinski

Re: floot_log2() - two functions with the same name in GCC.

2006-01-21 Thread Marcin Dalecki
OK. Looking closer I have just found that in gcc/toplev.c #if GCC_VERSION < 3004 ... #endif Is missing around the floor_log2() and exact_log2() functions.

floot_log2() - two functions with the same name in GCC.

2006-01-21 Thread Marcin Dalecki
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