Incorrect output when translating function header for fputs
dbampersand opened this issue · 0 comments
dbampersand commented
Hello,
Here's a minimal example showing incorrect output when translating fputs on MacOS:
#include <stdio.h>
int main()
{
FILE *f;
f = fopen("file.txt", "w+");
fputs("test", f);
fclose(f);
return 0;
}
The output from c2v:
C to V translator 0.3.1
translating test.c ... test.v:4:11: error: parameter name must not begin with upper case letter (`Char`)
2 | module main
3 |
4 | fn fputs( Char *restrict, FILE *restrict) int
| ~~~~
5 |
6 | fn main() {
Steps to reproduce:
- Copy C segment into a new file, test.c
- Run
v translate test.c