[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gm2] Calling C functions
From: |
john o goyo |
Subject: |
[Gm2] Calling C functions |
Date: |
Sat, 24 Nov 2012 21:38:17 -0500 |
The info page (Para. 2.14) states:
For example unbounded arrays are
passed as a `struct {void *address, unsigned int high}' and the
contents of these arrays are copied by callee functions when they are
declared as non `VAR' parameters.
Here is an example which can be found in the source tree
`gcc-VERSION-GCC/gcc/gm2/examples/callingC/libprintf.def'
DEFINITION MODULE FOR "C" libprintf ;
EXPORT UNQUALIFIED printf ;
PROCEDURE printf (a: ARRAY OF CHAR; ...) : [ INTEGER ] ;
END libprintf.
These cannot both be correct as printf() knows nothing about the
structure
in the first paragraph. What happens to the HIGH value.
jog
- [Gm2] Calling C functions,
john o goyo <=