Newsgroups: | comp.compilers |
From: | jmccarty@spdmail.spd.dsccc.com (Mike McCarty) |
Keywords: | C++, optimize |
Organization: | DSC Communications Corporation, Plano, Texas USA |
References: | 95-08-034 95-08-124 |
Date: | Thu, 24 Aug 1995 19:05:10 GMT |
Paul Eggert (eggert@twinsun.com) writes:
> For example, the C Standard, by my reading, does not define the
> behavior of `F()+F()' if F's definition is `int F() {return x++;}',
Mark Brader <msb@sq.com> wrote:
)Yep. In fact, I remember that either during the public review of the
)C standard or in a private communication with the redactor, I suggested
)that it should explain what it meant to call a function. The response
)as to the effect that this is a general concept in programming languages
)and everyone knows what it means, and I accepted that. But this matter
)of disagreement showed that I was wrong to do so!
Interesting. I disagree with whatever source you used. I don't even
like the word "call", but prefer "invoke". I have used (and written a)
compilers which automatically "inlined" compiled code if it were
"called" less than a certain number of times in the source, and were
less than a certain size. I.E., it made a tradeoff between size and
speed. The emitted code was, as usual, also subject to common sub
expression removal and other optimizations as well.
Mike
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.