C files to V translated successfully but all got plenty of errors when running.
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start with the reported hello_world.c and generated hello_world.v, then reproduce the errors using the listed V, c2v, and GCC versions. Compare the translated output with the terminal errors and the results from the sorting_algorithms and calculate_pi examples. Done means identifying the translation cause and confirming that the affected C examples run without the reported errors.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
There were 3 files I translated, all exhibits similar characteristics: all translated successfully but lots of errors when running the file.
Starting from sorting_algorithms (bubble sort, heap sort, etc)
Then I pull out a simpler C file: calculate_pi
Lastly I tried a hello_world C file --> translated successfully and some errors, but after manual fixing here and there I got it to run.
here is my hello_world.c
#include <stdio.h>
int main(void)
{
const char lang[] = "C";
const char object[] = "World";
printf("Hello, %s %s!\n", lang, object);
return 0;
}
below is the translated hello_world.v
@[translated]
module main
type Size_t = i64
type Ssize_t = i64
type Rsize_t = usize
type Intptr_t = i64
type Uintptr_t = i64
type Ptrdiff_t = i64
type Wchar_t = u16
type Wint_t = u16
type Wctype_t = u16
type Errno_t = int
type Time_t = Time64_t
type pthreadlocinfo = voidptr
type pthreadmbcinfo = voidptr
struct Locale_tstruct {
locinfo Pthreadlocinfo
mbcinfo Pthreadmbcinfo
}
type _locale_t = voidptr
struct LC_ID {
wLanguage u16
wCountry u16
wCodePage u16
}
type LPLC_ID = voidptr
struct Threadlocinfo {
_locale_pctype &u16
_locale_mb_cur_max int
_locale_lc_codepage u32
}
struct FILE {
_Placeholder voidptr
}
type _off_t = int
type Off32_t = int
type _off64_t = i64
type Off64_t = i64
type Off_t = Off32_t
type Fpos_t = i64
fn main() {
lang := c'C'
object := c'World'
C.printf(c'Hello, %s %s!\n', lang, object)
return
}
below is the error messages I got when trying to run the hello_world.v
as you can see the errors are minor typos...but why these errors appeared in the first place?
I mean in the Youtube demo, you translated the whole DOOM game...why translating just a hello_world script ended up with these errors?
For the other files I just don't bother anymore coz it's a lot and lots of minor errors that needed fixing.
Also looking at there are some open issues relating to the same error...should we expect a fix sometime soon?
V 0.4.4 4145669
C2V latest version
using GCC version 13.2.0 from winlibs
- Lenguaje dominante
- V
- Estrellas
- 255
- Forks
- 38
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 16
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vlang/c2v
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
vlang/c2v#229 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
vlang/c2v#204 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
vlang/c2v#189 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
C2V issue translating .h fileAbiertoBug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Issues similares
-
mlir
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
llvm/llvm-project#241070 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
from-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
bug scope:codegen
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug sev-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
better error message error not reported I/O ICE low priority semantics
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día