On Tue, Feb 05, 2002 at 10:06:42PM -0500, Josh Wilmes wrote:
> 
> Who understands this? :)
> 
> op enternative() {
>   goto ADDRESS(( run_native(interpreter, CUR_OPCODE, (opcode_t *)interpreter->c$
> }
> 
> 
> The "goto ADDRESS()" syntax appears to be broken, but I have no idea how 
> to fix it.  Here are the compiler messages:

I changed it to use the goto ADDRESS() syntax. But that just compiles
down to the exact code it used to before I got there, including the
same warning message from gcc. I made no attempt to understand it; I
just made sure I didn't break it any more than it already was. :-)

I have local code that uses the goto ADDRESS() form without warnings:

  goto ADDRESS(( re_backtrack(interpreter, state, expr OFFSET($3)) ))

but I think that's because re_backtrack returns a void*. run_native()
returns an opcode_t*, which is fine for the regular core_ops.c but
gets returned as void** in core_ops_prederef.c. I think the computed
goto path does a third thing, but I don't know how to invoke that.

Does enternative work with prederef mode? Can someone familiar with
these things figure out a general way for dealing with it? (If you
want a quick fix, change enternative to return void*).

Reply via email to