Were GNU C extensions proposed for the standard?

brnstnd at stealth.acf.nyu.edu brnstnd at stealth.acf.nyu.edu
Thu Jan 25 09:24:42 AEST 1990


In article <CHUCKP.90Jan24094828 at halley.ncr-fc.FtCollins.NCR.com> chuckp at ncr-fc.FtCollins.NCR.com (Chuck Phillips) writes:
> Consider the difficulty of automatic inlining of separately compiled
> functions.  I'm no compiler expert, but this _seems_ like an expensive
> optimization to implement.  By having an inline (keyword) definition in the
> header file normally used when accessing the function (e.g. string.h), this
> type of optimization can be had much cheaper.

Correct. It's simply impossible to do that inlining under the current
compile-link model, and worse than impossible for the compiler to figure
out when that inlining should happen. (After all, there's no excuse for
the compiler to look at the code in another file, and the linker can't
perform this optimization.) GNU did a good job with inline.

---Dan



More information about the Comp.lang.c mailing list