I have another problem. I have a 405-line file (containing a single
.pcc_sub) that is being included from my main .imc.
I get:
error:imcc:pcc_return not inside pcc subroutine
in file 'lib/interpret.imc' line 397
included from 'tcl.imc' sub '__interpret' line 116
...
Though the file contains:
1 .pcc_sub __interpret prototyped
2 # An array of commands to interpret.
3 .param PerlArray orig_commands
...
392 DONE:
393 .debug("final retval is '")
394 .debug(retval)
395 .debug("'\n")
396 .pcc_begin_return
397 .return retval
398 .pcc_end_return
(I know the macro support is going away soon, I'm just trying to get
things working with the current snapshot.)
So, I /am/ inside a pcc subroutine when I .return.
I'm trying to slim this down into a smaller test, but thought I'd post
this in the meantime.
Regards.
--
Will "Coke" Coleda will at coleda
dot com
Is there a .end at the end of this?
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
Managed to shrink it down to:
.pcc_sub __interpret prototyped
newsub P1, .Sub, __interpret
.pcc_begin_return
.return 0
.pcc_end_return
.end
It appears that creating a Sub that refers to the sub you're currently
in is the trigger. If I change the sub name to "foo", it complains
about not finding "foo". Comment it out, it compiles.
Sorry I didn't narrow down to a test case first -- after months of not
touching this, I wasn't sure how long it would take me. =-)
> 1 .pcc_sub __interpret prototyped
> 2 # An array of commands to interpret.
> 3 .param PerlArray orig_commands
Please note that between .pcc_sub and .param nothing is allowed, not even
a comment.
leo
> Managed to shrink it down to:
> .pcc_sub __interpret prototyped
> newsub P1, .Sub, __interpret
> .pcc_begin_return
> .return 0
> .pcc_end_return
> .end
Two problems: You are overriding the already existing Sub with that name
and 2) you destroy your return continuation, which could be already in P1.
leo
I'll commit a fix shortly.
-Melvin