Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!oliveb!pyramid!prls!mips!sah From: sah@mips.COM (Steve Hanson) Newsgroups: comp.lang.c Subject: dpANSI Prefined macro names Message-ID: <2077@gumby.mips.COM> Date: 25 Apr 88 22:01:15 GMT Lines: 32 Keywords: machine-dependent,built-in,alloca(3) The predefined macro naming convention in dpANSI C appears to provide a reasonable way to support machine-dependent functions. The MIPS C Compiler use of the stack pointer makes the *machine-dependent* implementation of alloca(3) impossible. [The reasons for this and why we want to support alloca could be the subject for another posting.] By using the dpANSI C predefined macro naming convention a built-in function can be provided to *efficiently* support application packages making use of alloca. The idea would be to provide a header file (e.g. alloca.h) containing the macro-definition: # define alloca(x) _BUILTIN_alloca(x) The MIPS C Compiler upon seeing the call to _BUILTIN_alloca(x) would transform it into the appropriate in-line sequence of code. Comments regarding experiences with the dpANSI C predefined macro naming convention and the use of built-in functions are welcome? -- UUCP: {ames,decwrl,prls,pyramid}!mips!sah USPS: MIPS Computer Systems, 930 Arques Ave, Sunnyvale CA, 94086