alloca

Applies to C

Purpose

Substitutes inline code for calls to function alloca, as if #pragma alloca directives were in the source code.

Syntax


Syntax Diagram

Notes

Applies to C If #pragma alloca is unspecified, and if you do not use -ma, alloca is treated as a user-defined identifier rather than as a built-in function.

Applies to C++ In C++ programs, you should use the __alloca built-in function. If your source code already references alloca as a function name, use the following option on the command line when invoking the compiler:

-Dalloca=__alloca

You may want to consider using a C99 variable length array in place of alloca.

Example

To compile myprogram.c so that calls to the function alloca are treated as inline, enter:

xlc myprogram.c -qalloca

Related References

Compiler Command Line Options
D
ma
#pragma alloca IBM Copyright 2003