#pragma alloca (AIX)

The #pragma alloca directive specifies that the function alloca(size_t size) is to allocate space for an object of size bytes. The allocated space is put on the stack.

You must include the #pragma alloca directive to have the compiler provide an inline version of alloca. Alternatively, the -ma compiler option substitutes inline code for calls to function alloca without specifying the #pragma alloca directive in the source code. If #pragma alloca is unspecified, or if you do not use -ma, alloca is treated as a user-defined identifier, rather than as a built-in function.

This pragma must be included in the source before the first function definition. Once specified, it applies to the rest of the file and cannot be turned off. If a program source contains functions that you want compiled without #pragma alloca, place these functions in a different file.

Whenever you make a call to alloca, you must include the header file <malloc.h> to define alloca.



Preprocessor Directives


#pragma Preprocessor Directives
List of Preprocessor Directives