GCC 3.3 release criteria
Gabriel Dos Reis
gdr@integrable-solutions.net
Tue Feb 25 11:32:00 GMT 2003
Richard Earnshaw <rearnsha@arm.com> writes:
[...]
| > Especially in C, people that do use "inline" probably have strong
| > reasons for why they want to see this function be inlined. For example
| > in the kernel, they want to be able to control and predict what the
| > compiler does with the code. It this case it is a mistake on the
| > compiler's part to think it can outsmart man.
| >
| > Like Franz said, for C++ things are probalby different.
| >
|
| The cases in C where I've seen people get most upset about the compiler
| not using inline are when the program has subtly different semantics once
| inlining has occurred (for example, taking the address of a label and then
| using that as a key in a debug message). But these are precisely the
| types of cases where we probably don't want inlining: relying on such
| optimization to get correct behaviour is a dangerous mistake.
Agreed. Ideally "inline" should not change the observable behaviour.
However, concerning "inline", ISO C99 has provided and blessed ways to
violate the ODR and to make "ready for changing semantics" :-(
-- Gaby
More information about the Gcc
mailing list