[Inform 6] @pop instruction

With a version of the compiler (inform 632 6321 633) compile by myself, with MinGW under WinXP 32, the compiler crash (plant the system) if the @pop instruction is in game.[ main; @pop; ];But, if I use the already compiled compiler 6.32 for windows found on if-archive, i obtain when i compil the game :

How to compile source code of the Inform 6 compiler under Windows and why only the pop instruction made plant the system when i compil myself the compiler !?

It looks like there are several bugs here.

The compiler thinks that the @pop instruction is only valid in v3 and v4. Then it crashes while trying to print this error message. (It’s trying to printf(NULL).)

The Z-spec document indicates that @pop is valid in all Z-machine versions, so the compiler may just be wrong here. However, people more familiar with Z-machine history should chime in.

Inform code usually uses the @pull opcode, rather than @pop. @pull also pops a value off the stack, but stores it in a variable rather than discarding it. You should use this – perhaps with a dummy variable – rather than @pop.

What is strange, it is that the crash arrives only with the source version compiled by me. With the version pre-compiled for windows(in if-archive), i obtain the error message.
Nothing serious; i can make without. Thank.

The opcode slot for @pop is re-used from V5 onwards for @catch, which is why it’s only for V3/4. The spec doesn’t make that very clear, though.

Oddly, if I try your test on an Inform6 compiled with MinGW using the latest GitHub code, I don’t get a crash, but I do get the wrong error:

[code]Inform 6.33 (31st August 2013)
line 2: Error: Assembly mistake: syntax is "check_unicode <0 to 4 operands> ->

Compiled with 1 error (no output)[/code]
That isn’t right. I’ll have to look into what’s going wrong at some point. It looks like an uninitialized variable somewhere…

I get

syntax is “(null)”

So yeah, something uninitialized.

Filed inform7.com/mantis/view.php?id=1172 .