Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 04:55 PM 8/1/00 -0400, John Tobey wrote:
> >Well, I am going to assume you are wrong and the above two foo()
> >implementations will produce exactly the same code.
>
> Your assumption is incorrect for good compilers. (Whether gcc counts as
> good for a particular platform is a place I'm Not Going right now
Agreed. :-)
> ) Compaq C
> will do it differently depending on the number of times that the inlined
> function is used.
Okay. For starters, assume that every inline function is called in
exactly one place in the translation unit that defines its non-inline
counterpart. That one place being, of course, i_foo's foo. This is a
natural result of a clean, PI-like-generated source.
Other files can choose between the foo and i_foo versions, but foo's
compiled form will not be changed, of course, unless the linker gets
in on the act.
--
John Tobey, late nite hacker <[EMAIL PROTECTED]>
\\\ ///
]]] With enough bugs, all eyes are shallow. [[[
/// \\\