Accelerator Manual (G06.24+, H06.03+)

Preparing Your Program for the Accelerator
Accelerator Manual527303-002
3-10
Non-Standard Procedure Call or Return RP Values
The Accelerator option ReturnValSize must be used for this procedure to return the
three values correctly:
ReturnValSize FOO 3
The Accelerator also issues Warning 32 for the following program fragment:
FOR i := 0 TO 4 DO STACK( i );
?RP = 4
PROC Start;
BEGIN
INT i;
FOR i:=0 TO 4 DO
BEGIN
STACK i;
?RP 7
END;
! other code
?RP = 4
END;
This example loads five values on the stack, and sets the correct current RP
setting to four. You do not need to specify the return value size for this example.
Function f returns the type “void *” in this C example. You must either recompile this
program with a version of the C compiler released on or after 01DEC90 or specify a
ReturnValSize option.
void *f(void)
{
return((void *) 0);
}
main()
{
char *cp;
cp = f();
}