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: floot_log2() - two functions with the same name in GCC.



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 I saw them. However pease look at the if else endif guards in the header.
extern inline is just supposed to guarantee that a copy
of the function will be spawn out to an .o file when it's seen. Right?
The variant in toplev.c will be of course generated as well. And then
it's just link order roulette which one of them will be used...



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