gen: fixes C warnings by appending U after unsigned integer literals (#6384)
parent
5da698b4bf
commit
3a795e6d9b
|
@ -1963,6 +1963,10 @@ fn (mut g Gen) expr(node ast.Expr) {
|
|||
// }
|
||||
// g.write(')(')
|
||||
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('))')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue