This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mutually-recursive types and an old puzzle
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