 <p>That book seems to be assuming the compiler inlines at a source level, this of course totally depends on the compiler. Most will begin inlining at the AST level, where transforms and certain optimizations can and will occur. This all assumes the compiler <em>will</em> inline the code.</p> <p>If we look at your function, any <em>decent</em> compiler will turn them both into the same IR code, as it will compile the inline function before it is inlined, thus a temporary is required regardless (at IR level). when the IR is then actually inlined, the temporary will be folded away and instead replaced with the assignment destination of the call to <code>max</code>.</p> <p>When we compile down to machine code, things can change even more, not only can temporaries be removed, but the destination will most likely be a register (in this case), which will have probably been used for on of the source operands as well.</p> <p><strong>Bottom Line:</strong> This totally depends on your compiler, optimization levels and how it does variable livelyness analysis, value propagation and folding. </p>