On Thu, 15 Apr 1999, Aaron Ardiri wrote:

> > 1. You ARE doing a libc call, because you are linking to libc, and you
> > don't have LibC.prc installed.  This is the only way you can get that
> > particular error.
> 
>   actually.. i was not doing anything like that.
> 
>   no strings, no library routines.. all i was doing was basic 
>   passing of 'struct' objects.
> 
>   i had the following prototype:
> 
> ---
>     typdef struct
>     {
>       Byte x;
>       Byte y;
>     } MyObject, *MyObjectPtr;
> 
>     void draw(MyObject o) {
>       // use 'o'
>     }
> ---
> 
>   and i replaced it with:
> 
> ---
>     void draw(MyObjectPtr o) {
>       // use "*o"
>     }
> ---
> 
>   and it got rid of the message. my 'C' understanding tells
>   me that this should be allowed - and it should not crash.
>   but maybe when i write my program in the normal 'gcc' -
>   verses the 'palmos-gcc' something changes?
> 
>   interesting? i gave up caring.. now i just pass pointers,
>   it is more efficient anyhow - especially on the stack.

Well, if you have a static (global) string, and are passing it by value on
the stack the gcc compiler does a strcpy or memcpy!

In effect (and the .s file should show something like this):

{
MyObject dummytemp;
memcpy( dummytemp, o, sizeof(MyObject) );
draw( dummytemp );
}

This would have shown up in the m68k-..-nm from Main.o.

Reply via email to