Description
The #pragma stack_align directive allows you to specify the function(s) for which stack alignment rules must be enforced because they are called by code not compiled with the VisualAge C++ compiler.
Syntax
Code generated by the VisualAge C++ compiler ensures that the stack remains aligned on a boundary such that access to operands stored on the stack can be executed more efficiently. However, the stack alignment of a function cannot be guaranteed if the function is called by code that is not compiled with the VisualAge C++ compiler. To be able to maintain an efficiently aligned stack, the compiler must be told when a function could be called by code that has not compiled with VisualAge C++ compiler. The #pragma stack_align can be used to identify such functions so that the VisualAge C++ compiler can generate code to enforce the alignment rule in these functions for optimal performance. Examples of such functions are exported functions in DLLs.
![]()
Preprocessor
Directives - An Overview
Preprocessor
Directive - #pragma
