Hi Ben,

Glad to know that you read this at Saturdays.. :-)

> I don't ever remembering testing computed labels with that compiler.

Do you remember this?

"Actually, that's exactly what it does...

You say

void *labels[] = { &&lab1, &&lab2, &&lab3 }

to setup an array of labels, then write

goto *labels[2];

as a computed goto.  This will compile in CW right now, but it will give
you an internal compile error.  Although, when it is implemented, I
would think using it might disable some optimizations, since the
compiler would have to be quite conservative in computing the possible
locations that the goto would reach."

You wrote this about 3 years ago. ;-)

> My
> guess is that the compiler emitted relocations for the three labels, but
> they didn't ever emit the symbols that will hold the computed
> addresses.  Can you use computed goto anywhere in your code?

No, i was trying to move from the switch/case to a direct-dispatch table.
This was my second test, bc the other one was issuing lots of "internal
compiler error".

best

    guich



-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to