Fixes #87. Currently, running make causes 8 errors from GCC due to warnings being applied as errors through the -Werror flag. I was able to reproduce the same errors mentioned in the image in #87.
All of the errors are -Werror=enum-conversion, where enums are implicitly casted to the enum Op.
This pull request fixes this by simply casting enums with the function's return type. Since all casts are enum-to-enum casts I think this is the safest solution.
I've tested this fix on the x86 backend. I've confirmed that all of the following tests, including the self-hosting test, runs successfully on my machine:
Fixes #87. Currently, running
make
causes 8 errors from GCC due to warnings being applied as errors through the-Werror
flag. I was able to reproduce the same errors mentioned in the image in #87.All of the errors are
-Werror=enum-conversion
, where enums are implicitly casted to the enumOp
.This pull request fixes this by simply casting enums with the function's return type. Since all casts are enum-to-enum casts I think this is the safest solution.
I've tested this fix on the x86 backend. I've confirmed that all of the following tests, including the self-hosting test, runs successfully on my machine:
make x86
make test-x86-full
tools/check_selfhost.sh x86