The Inform Technical Manual section 13.4(iv) ("
Changes made between v6.04 and v6.05") lists among the fixed bugs:
Spurious "variable declared but not used" warnings appearing for a variable used only as a store destination in assembly language.
However, the behavior described as fixed can be seen when using Inform 6.34 (and 6.35). Some example code:
Constant Story "Demonstration of unexpected compiler warning"; Constant Headline "^cf. ITM 13.4(iv)^"; Include "Parser"; Include "VerbLib"; Include "Grammar"; Class Room has light; Room Start "Starting Place" with description "An uninteresting place."; Global read_char_result; [ WaitForKey ; @read_char 1 -> read_char_result; ]; [ Initialise ; WaitForKey(); location = Start; ];
Messages seen when compiling the above:
Inform 6.34 (21st May 2020) line 17: Warning: Global variable "read_char_result" declared but not used Compiled with 1 warning Inform 6.35 (in development) line 17: Warning: Global variable "read_char_result" declared but not used Compiled with 1 warning
Was this bug reintroduced at some point? Or perhaps is it that the original correction in v6.05 didn’t cover this case?