GC tweaks
Stephen Weeks
MLton@sourcelight.com
Fri, 29 Jun 2001 10:20:21 -0700
> The gc code is not type correct: the function dfsPop() in GC_size.c returns a
> pointer and takes a single GC_state argument. It is passed to maybeCall()
> and GC_foreachPointerInObject(), which requires it to take 2 arguments, the
> second one being a (pointer *) and to return void.
>
> This could actually cause bad code, although it is unlikley. I don't know
> why GCC didn't detect this, but my guess is that it doesn't check the types
> on function pointers.
I am confused. The only thing I see that you could be talking about is line 149
of GC_size.c, which is
GC_foreachPointerInObject(s, dfsPushIfMarked, dfsPop(s));
That looks type correct to me.