This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
Steven Bosscher <s.bosscher@student.tudelft.nl> writes:
| > There are reasons I didn't declare __cmath_power inline in the first place.
| > That is why I asked for data and ways to reproduce them.
|
| What are those reasons? Clearly it helps to add the inline keyword.
| Something in the standard???
|
| > | Now cut away all the redundant labels and other cruft, and you end up
| > | with:
| >
| > In short, you have demonstrated that if "inline" is given its obvious
| > meaning, the compiler can do a better job. That is what I claimed in
| > the first place.
|
| No, I've shown that inline still has a meaning in GCC whereas you
| claimed that "it was decided that the compiler knows better than the
| programmer", i.e. the compiler overrules the user.
And what I claimed corresponds to reality. See
http://gcc.gnu.org/ml/libstdc++/2003-05/msg00014.html
for *facts* from mainline. The compiler has decided it can ignore
inline when its counting of something has reached some limits, i.e. he
knows better than the programmer.
| What I've shown is that the compiler can take a hint.
No, you've shown that on a branch development, the compiler appears to
give "inline" its obvious meaning.
| If you look at the tree inliner, it still honours the inline keyword,
I know how the tree inliner is treating the inline keyword.
It honours the keyword only when it thinks that matches its own view.
-- Gaby