ARM Technical Support Knowledge Articles

INDIRECT FUNCTION CALLS

Applies to: C251 C Compiler

Answer


Information in this article applies to:


QUESTION

I'm using C251 Version 2 and need help with function pointers and reentrancy.

ANSWER

C251 Version 2 introduces a new compiler directive FUNCTIONS. This directive specifies whether functions pass parameters in fixed memory locations (like previous versions) or whether parameters are passed on the stack (like most C compilers where stack space is not an issue).

To pass parameters on the stack, compile your code as follows:

C251 mycode.c  FUNCTIONS(REENTRANT)

When compiled this way, you have no limitations with regards to function pointers, indirect function calls, and reentrancy.

Article last edited on: 2005-01-30 14:22:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential