Code Monkey home page Code Monkey logo

Comments (1)

ThisNekoGuy avatar ThisNekoGuy commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.