Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!boulder!spot!ziel From: ziel@spot.Colorado.EDU (ZIEL FRED ADAM) Newsgroups: comp.lang.c Subject: a reasonable approach to inlining Message-ID: <6667@sigi.Colorado.EDU> Date: 16 Jun 88 17:55:36 GMT References: <238@chem.ucsd.EDU> <2742@utastro.UUCP> <225800036@uxe.cso.uiuc.edu> <522@white.gcm> <3946@pasteur.Berkeley.Edu> Sender: news@sigi.Colorado.EDU Reply-To: ziel@spot.Colorado.EDU (ZIEL FRED ADAM) Organization: University of Colorado, Boulder Lines: 16 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@spot.colorado.edu disclaimer.h (line 10): syntax error.