Skip to content

Commit ab40d0c

Browse files
committed
fixes
1 parent cc4c243 commit ab40d0c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/c2v.v

+9-2
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ fn convert_type(typ_ string) Type {
673673
'uint8_t' {
674674
'u8'
675675
}
676+
'int8_t' {
677+
'u8'
678+
}
676679
'__int64_t' {
677680
'i64'
678681
}
@@ -710,6 +713,9 @@ fn convert_type(typ_ string) Type {
710713
'intptr_t' {
711714
'C.intptr_t'
712715
}
716+
'uintptr_t' {
717+
'C.uintptr_t'
718+
}
713719
'void' {
714720
'void'
715721
}
@@ -924,7 +930,7 @@ fn (mut c C2V) goto_stmt(node &Node) {
924930
if label == '' {
925931
label = '_GOTO_PLACEHOLDER_' + node.label_id
926932
}
927-
c.genln('goto ${label} // id: ${node.label_id}')
933+
c.genln('unsafe { goto ${label} } // id: ${node.label_id}')
928934
}
929935

930936
fn (mut c C2V) return_st(mut node Node) {
@@ -1776,7 +1782,8 @@ fn (mut c C2V) expr(_node &Node) string {
17761782
println(add_place_data_to_error(err))
17771783
bad_node
17781784
}
1779-
if expr.kindof(.decl_ref_expr) || expr.kindof(.unary_operator) {
1785+
1786+
if !expr.kindof(.paren_expr) {
17801787
c.gen('(')
17811788
defer {
17821789
c.gen(')')

0 commit comments

Comments
 (0)