mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gen: fixes C warnings by appending U after unsigned integer literals (#6384)
This commit is contained in:
parent
5da698b4bf
commit
3a795e6d9b
@ -1963,6 +1963,10 @@ fn (mut g Gen) expr(node ast.Expr) {
|
|||||||
// }
|
// }
|
||||||
// g.write(')(')
|
// g.write(')(')
|
||||||
g.expr(node.expr)
|
g.expr(node.expr)
|
||||||
|
if node.expr is ast.IntegerLiteral &&
|
||||||
|
node.typ in [table.u64_type, table.u32_type, table.u16_type] {
|
||||||
|
g.write('U')
|
||||||
|
}
|
||||||
g.write('))')
|
g.write('))')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user