From: | Rick Jones |
Date: | 11 Sep 2000 at 15:03:00 |
Subject: | Re: AMIOPEN: vpcc complaining... |
Hey Pat, you asked
> Can anyone tell me why vpcc could be having trouble with this:
>
> struct xpr xadd(struct xpr s,struct xpr t, int f)
>
> unsigned short pe[XDIM+1];
> short e;
>
> /* snip */
>
> *pe=e;
> return *(struct xpr *)pe;
> }
>
> The error I get is on the return statement and looks like this:
>
Are you aware that the return statement wants to copy the contents of the
structure to where-ever the caller allocated space for the returned value?
> vpcc1 internal error:xadd.c: In function `xadd':
> xadd.c:36: Elate call may not be properly defined: `memcpy'
A call to memcpy has been generated to facilitate the "pass by value"
structure return (I think).
> vpcc1 internal error:xadd.c:36: Elate call may not be properly defined:
> `memcpy'
> vpcc1 internal error:xadd.c:36: Elate call may not be properly defined:
> `memcpy'
> vpcc: failed on xadd.c
>
> Including string.h (which has memcpy proto in Intent) or not makes no
> difference.
Purely speculating, but could it be that there is a subtle distinction in
symbolic
names for a 'c' lib version of memcpy which has been prototyped and a
compiler generated helper function which has not been properly declared.
Like "memcpy" vs. "_memcpy".
Rick Jones
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html