Previous: regparm, Up: Attributes

3.6 stkparm

The ‘stkparm’ attribute, together with the ‘regparm’ attribute (see regparm), can be used to fine-tune the way arguments are passed. It makes ‘GCC’ pass arguments on stack for the function for which it was used, regardless of whether the global ‘-mregparm’ option was used or not (see -mregparm).

Note: There is generally no need to use this attribute unless files compiled with different calling conventions are linked together.

For compatibility with other AmigaOS ‘C’ compilers, a preprocessor symbol ‘__stdargs’ is available, which expands to __attribute__((stkparm)) (see Keyword macros).

The ‘stkparm’ attribute is mutually exclusive with the ‘regparm’ attribute (see regparm).

This attribute is necessary both in function declarations (prototypes) and definitions (function code).

This attribute was first made available in the ‘GCC’, ‘Geek Gadgets’ snapshot ‘961012’.