Closed viccie30 closed 2 years ago
While the parameters declared in test/trans.d/ragel.lm: https://github.com/adrian-thurston/colm/blob/fc61ecb3a22b89864916ec538eaf04840e7dd6b5/test/trans.d/ragel.lm#L4-L8 and test/rlparse.d/ragel.lm: https://github.com/adrian-thurston/colm/blob/fc61ecb3a22b89864916ec538eaf04840e7dd6b5/test/rlparse.d/ragel.lm#L4-L8 are indeed strings, all parameters for host calls declared in Colm source files are converted to value_t by Compiler::writeHostCall: https://github.com/adrian-thurston/colm/blob/fc61ecb3a22b89864916ec538eaf04840e7dd6b5/src/compiler.cc#L1109-L1117.
This led to warnings when compiling with LTO. Correcting the prototypes and inserting the appropriate casts makes everything compile without warnings. The test suite still passes the same on my x86_64 machine.
While the parameters declared in test/trans.d/ragel.lm: https://github.com/adrian-thurston/colm/blob/fc61ecb3a22b89864916ec538eaf04840e7dd6b5/test/trans.d/ragel.lm#L4-L8 and test/rlparse.d/ragel.lm: https://github.com/adrian-thurston/colm/blob/fc61ecb3a22b89864916ec538eaf04840e7dd6b5/test/rlparse.d/ragel.lm#L4-L8 are indeed strings, all parameters for host calls declared in Colm source files are converted to value_t by Compiler::writeHostCall: https://github.com/adrian-thurston/colm/blob/fc61ecb3a22b89864916ec538eaf04840e7dd6b5/src/compiler.cc#L1109-L1117.
This led to warnings when compiling with LTO. Correcting the prototypes and inserting the appropriate casts makes everything compile without warnings. The test suite still passes the same on my x86_64 machine.