mutually-recursive types and an old puzzle
Zack Weinberg
zack@codesourcery.com
Wed Jun 30 21:34:00 GMT 2004
Joe Buck <Joe.Buck@synopsys.COM> writes:
>> I just gave a hint to why the fixpoint operator of C++ may suffice
>> to solve the puzzle -- it wasn't an final solution.
>
> Here's one, if anyone's curious. The class has one member, which is
> a function pointer; the operator() overload calls the function pointer.
This works, but doesn't get optimized down to ideal code, mainly
because the ABI prevents FsmState from being returned in a register
(since it's not a POD structure).
zw
More information about the Gcc
mailing list