c2v
c2v copied to clipboard
Strange error message about binary number with unsuitable digit
- Download source to sqlite release: https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release
- Extract source.
- cd sqlite
- v translate tool/sqldiff.c
C to V translator 0.3.1
translating tool/sqldiff.c ... tool/sqldiff.v:1145:17: error: this binary number has unsuitable digit `e`
1143 | iblock := 0
1144 |
1145 | bestcnt := 0
| ^
1146 | bestofst := 0bestlitsz := 0
1147 | hash_init(&h, &zout [base] )
Internal vfmt error while formatting file: tool/sqldiff.v.
Encountered a total of: 1 errors.
took 347 ms ; output .v file: tool/sqldiff.v
Translated 1 files in 347 ms.
Figured it out... the next line starts with be
, so V is seeing 0be
thinking you meant to start a binary literal, but the e
is, indeed, unsuitable for that.
The next line is also badly formatted, with no newline after the first 0.