builtin: define C.abs()

master
Alexander Medvednikov 2022-04-20 13:03:22 +03:00
parent 0887b59254
commit 364656b312
2 changed files with 2 additions and 1 deletions

View File

@ -53,6 +53,7 @@ fn C.chmod(&char, u32) int
fn C.printf(&char, ...voidptr) int
fn C.puts(&char) int
fn C.abs(f64) f64
fn C.fputs(str &char, stream &C.FILE) int

View File

@ -69,7 +69,7 @@ fn (mut p Parser) array_init() ast.ArrayInit {
// [100]u8
elem_type = p.parse_type()
if p.table.sym(elem_type).name == 'byte' {
p.error('`byte` has been deprecated in favor of `u8`: use `[10]u8` instead of `[10]byte`')
p.error('`byte` has been deprecated in favor of `u8`: use `[10]u8{}` instead of `[10]byte{}`')
}
last_pos = p.tok.pos()
is_fixed = true