a reasonable approach to inlining

ZIEL FRED ADAM ziel at spot.Colorado.EDU
Fri Jun 17 03:55:36 AEST 1988


One of the things I think Microsoft did right with C 5.0 was add "intrinsic"
functions.  These are standard library functions such as movmem, strcmp, strcpy,
inp, outp, etc. that are inlined.  The instrinisic code generation
can be turned on and off individually for each function using a #pragma.
This came in handy when their intrinsic inp and outp didn't work on version
5.0 of the compiler since I could keep the inlining for the functions I
wanted, but turn it off for those two.  They also have #pragma's to control
the optimizations which is handy since it allows you to disable loop optimation
around a certain loop if that is necessary (ie. optimized null delay loops
don't serve their purpose if they are optimized away [yes, I know there are
better ways than delay loops... it's an example]).  Are these uses of 
#pragma common ones?  I though they were pretty handy. 

----------------------------------------------------------------------
Fred Ziel, Colorado Center for Astrodynamics Reserach, CU-Boulder 
uucp:   ..!{nbires,ames!ncar}!boulder!ziel  domain: ziel at spot.colorado.edu
disclaimer.h (line 10): syntax error.



More information about the Comp.lang.c mailing list