sah@mips.COM (Steve Hanson) (04/25/88)
The use of the predefined 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 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 predefine 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