Should I use macros to inline code?
Doug Gwyn
gwyn at smoke.brl.mil
Thu Mar 28 07:38:13 AEST 1991
In article <1991Mar27.024602.21399 at visix.com> adam at visix.com writes:
>Given today's C compilers, is there any reason at all to explicitly
>inline code with macros?
Sure -- many of today's C compilers still don't inline functions.
>Assuming that's useful, is there any use for subroutines, so that a
>routine is only inlined once per function?
Rephrasing this to make sense, I guess you're asking whether if a function
is invoked only once there is any point to having it an actual function
rather than a macro (or in-lined). The answer to that is, yes, it helps
immensely when using a typical debugger.
>(Actually, I don't see any way to pass arguments to and return from
>subroutines that would make them useful in C.)
???
More information about the Comp.lang.c
mailing list