This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inlining function into itself (via transitivity


Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz> writes:

> Hello,
> 
> is it correct to inline function into itself (via transitivity), i.e.
> 
> a <-- b <-- c <-- a
> 
> where x <-- y means that y is inlined into x.
> 
> Thanks for answer.

Yes, this can be done without changing the meaning of the program.  It
is often pointless, though.

You can even inline a routine directly into itself, like:

a <-- a

although this is very often pointless.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]