Closed ivanperez-keera closed 9 months ago
Change Manager: Verified that:
Solution is implemented:
[X] The code proposed compiles and passes all tests. Details: Build log: https://app.travis-ci.com/github/Copilot-Language/copilot/builds/267854133
[X] The solution proposed produces the expected result. Details: This bug only manifests in some architectures, so we don't have a way of always reproducing it. Implementation evaluated by visual inspection of the code.
For what is worth, searching for void main
in the search tree now brings up no results, while searching for int main
brings up several results:
$ grep -nIHre 'void main'
$ grep -nIHre 'int main'
copilot-c99/tests/Test/Copilot/Compile/C99.hs:160: , "int main () {"
copilot-c99/tests/Test/Copilot/Compile/C99.hs:696: , "int main () {"
That, however, is a fairly weak check, since splitting the type and the function name would make the search pattern not succeed (which is common for example with other coding standards like GNU's).
Modify the tests for
copilot-c99
so that themain
has typeint
, making it implicitly also return0
, as prescribed in the solution proposed for #468.