Comments (1)
This can also be reproduced by attempting to translate sudo
, using the same versions (using sudo
's default project configure settings):
c2v.toml
(Would be great if there was an official scaffolding tool to make doing this not a pain)
[project]
uses_sdl = false
output_dirname = "c2v_out.dir"
additional_flags = "-I. -I.. -I../.. -I../../.. -I../../../.. -I../../../../.. -I./src -I../src -I../../src -I../../../src -I../../../../src -I../../../../../src -I./include -I../include -I../../include -I../../../include -I../../../../include -I../../../../../include"
v translate *
C to V translator 0.3.1
"src" is a directory, processing all C files in it recursively...
translating ./apparmor.c ... Reformatted file: /mnt/extraStorage/Development/sudo/src/c2v_out.dir/apparmor.v
took 22 ms ; output .v file: ./c2v_out.dir/apparmor.v
translating ./conversation.c ... c2v_out.dir/conversation.v:6:22: error: unexpected token `*`, expecting `,`
4 | fn vfprintf( &C.FILE, &i8, va_list) int
5 |
6 | fn vfprintf(__s FILE *restrict, __format Char *restrict, __arg va_list) int
| ^
7 |
8 | fn fileno(__stream &C.FILE) int
Internal vfmt error while formatting file: /mnt/extraStorage/Development/sudo/src/./c2v_out.dir/conversation.v.
Encountered a total of: 1 errors.
took 249 ms ; output .v file: ./c2v_out.dir/conversation.v
translating ./copy_file.c ...
Unhandled expr() node {PredefinedExpr} (ast line nr node.ast_line_nr "./copy_file.c"):
{PredefinedExpr} name:"__func__" value:"" loc:Loc{
offset: 0
file: ''
line: 0
col: 0
tok_len: 0
included_from: IncludedFrom{
file: ''
}
spelling_loc: IncludedFrom{
file: ''
}
range: Range{
begin: Begin{
spelling_loc: IncludedFrom{
file: ''
}
}
}
} #c: 1 typ:"const char[17]"
/tmp/v_1000/../../../../../../usr/lib/vlang/vlib/builtin/builtin.c.v:639: at print_backtrace: Backtrace
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:1778: by main__C2V_expr
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:1653: by main__C2V_expr
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:1661: by main__C2V_expr
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:364: by main__C2V_fn_call
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:1681: by main__C2V_expr
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:1031: by main__C2V_statement
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:982: by main__C2V_statements
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:480: by main__C2V_fn_decl
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:2047: by main__C2V_top_level
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:2004: by main__C2V_translate_file
/tmp/v_1000/../../../../../../home/neko-san/.vmodules/c2v/c2v.v:1932: by main__main
/tmp/v_1000/../../../../../../tmp/v_1000/c2v.tmp.c:17582: by main
C2V command: '/home/neko-san/.vmodules/c2v/c2v' 'aclocal.m4' 'autogen.sh' 'c2v.toml' 'config.h' 'config.h.in' 'config.log' 'config.status' 'configure' 'configure-help.txt' 'configure.ac' 'docker' 'docs' 'etc' 'examples' 'include' 'INSTALL.configure' 'INSTALL.md' 'lib' 'libtool' 'LICENSE.md' 'logsrvd' 'm4' 'Makefile' 'Makefile.in' 'MANIFEST' 'NEWS' 'pathnames.h' 'pathnames.h.in' 'plugins' 'po' 'README.LDAP.md' 'README.md' 'scripts' 'src'
C2V failed to translate the C files. Please report it via GitHub.
from c2v.
Related Issues (20)
- xml.c can not be converted to v
- doom specific hacks should be removed from c2v HOT 4
- C2V can't find header files from parent folder. HOT 4
- error: struct embedding must be declared at the beginning of the struct body
- parameter name must not begin with upper case letter HOT 1
- use `&Type` instead of `*Type` when declaring references HOT 1
- a type alias can not refer to itself: Dl_info
- unexpected token `*`, expecting name
- Failed to Properly Format Select Statement HOT 2
- UB program gets wrongly converted
- Problem converting glad.c to V HOT 1
- V Translate - header files not detected, no wrapper generated
- Wrapper generation - wrong types
- c2v incorrectly translates `sizeof var_name`
- `strftime()` error: parameter name must not begin with upper case letter (`Char`) HOT 1
- `getline()` error: unexpected token `*`, expecting `,`
- Weird define issue
- can't translate compound struct and union HOT 1
- can't translate assert
- C files to V translated successfully but all got plenty of errors when running.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c2v.