This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Richard dot Earnshaw at arm dot com
- Cc: Karel Gardas <kgardas at objectsecurity dot com>, Alexandre Oliva <aoliva at redhat dot com>, Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>, gcc at gcc dot gnu dot org
- Date: 30 Jul 2003 16:13:47 +0200
- Subject: Re: std::pow implementation
- Organization: Integrable Solutions
- References: <200307301401.h6UE1oN19727@pc960.cambridge.arm.com>
Richard Earnshaw <rearnsha@arm.com> writes:
| > | > | With Gaby's suggested interpretation, the compiler has *no* choice; it
| > | > | must obey the inlining constraint because the programmer always knows
| > | > | better... Even when prepared to admit that he doesn't.
| > | >
| > | > That assertion is wrong.
| > |
| > | Which bit of it? It's what I understand you to be suggesting.
| >
| > As I've repeatedly said, there are pathological cases where the
| > compiler simply cannot inline. Secondly, I'm saying that the
| > compiler does not always know better than the programmer. And in fact,
| > the programmer most of the time declares "inline" on purpose.
| >
| > Transmuting the meaning of "inline" is creating more fear, uncertainty
| > and doubt than we needed.
|
| Suggesting that a programmer must only use inline when they are convinced
| that better code will always result (ie that using inline when it may only
| sometimes produce better code is "dangerous") sounds even more like
| spreading FUD to me. You're going to get people saying "Never use inline,
| it can make your code worse".
Please, I didn't suggest that.
-- Gaby