From: | Jesse McClusky |
Date: | 11 Sep 2000 at 19:08:17 |
Subject: | Re: AMIOPEN: vpcc complaining... |
Doh! Spoke before I thought again...
I was thinking & not *, sorry.
Sounds like there's a problem with the compiler.
> > From: "artix" <artix@pacbell.net>
> >
> > 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:
>
> <snip>
>
> You're returning a pointer to something that exists only on the stack,
> and will be invalid the moment that return executes.
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html