Andrew Pinski wrote:

On Feb 27, 2005, at 5:30 PM, Steven Bosscher wrote:

Interesting.  You of course know Gaby is always claiming the exact
opposite: That the compiler must *honor* the inline keyword (explicit
or "implicit", ie. inline in class definitions), that inline is not
a hint but an order that the compiler must follow.
And much to my own surprise, I'm actually beginning to agree with him.


I always say that inline is like register, it is just a hint to the
compiler and nothing more (well in C++ it changes the linkage).
This same discussion in a way have come up for register in the past
which is why I always compare it to that keyword, if we did what you
are suggesting for inline, we may as well do the same for register.  And
now when someone compiles code made for ppc (which has lots of registers
available) on x86, you will get an ICE because the code uses register
a lot.

In the case or "register", we now have a compiler which seems to generate just as good code by ignoring the keyword as it did by honoring it, we avoid the kinds of ICEs you discuss. We don't know whether those things are true about "inline" or not.


--
Mark Mitchell
CodeSourcery, LLC
[EMAIL PROTECTED]
(916) 791-8304

Reply via email to