File "/home/tsf/sandbox/ppci/ppci/ir.py", line 687, in setter
"Expecting a Value instance, but got {}".format(value)
TypeError: Expecting a Value instance, but got None
exit() returns "void", so using the value it returns is illegal.
However this is not detected, and the parsing/semantic phase calls coerce() to add a cast from "void" to "int".
During IR generation, gen_cast crashes because it expects a IR value and gets None.
In semantics, coerce() should no accept to coerce "void" to anything.
This way, an error would be reported during parsing/semantic phase.
makes the compiler crash during IR generation.
exit() returns "void", so using the value it returns is illegal. However this is not detected, and the parsing/semantic phase calls coerce() to add a cast from "void" to "int". During IR generation, gen_cast crashes because it expects a IR value and gets None.
In semantics, coerce() should no accept to coerce "void" to anything. This way, an error would be reported during parsing/semantic phase.