1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix remaining errors. hello world now compiles

This commit is contained in:
Alexander Medvednikov
2020-03-12 09:11:41 +01:00
parent 853bb4c41e
commit 92d6eec09a
6 changed files with 46 additions and 21 deletions

View File

@ -6,7 +6,7 @@ module math
// with the sign bit of f and the result in the same bit position.
// f32_bits(f32_from_bits(x)) == x.
pub fn f32_bits(f f32) u32 {
p := *u32(&f)
p := &u32(&f)
return *p
}
@ -15,7 +15,7 @@ pub fn f32_bits(f f32) u32 {
// and the result in the same bit position.
// f32_from_bits(f32_bits(x)) == x.
pub fn f32_from_bits(b u32) f32 {
p := *f32(&b)
p := &f32(&b)
return *p
}
@ -23,7 +23,7 @@ pub fn f32_from_bits(b u32) f32 {
// with the sign bit of f and the result in the same bit position,
// and f64_bits(f64_from_bits(x)) == x.
pub fn f64_bits(f f64) u64 {
p := *u64(&f)
p := &u64(&f)
return *p
}
@ -32,7 +32,7 @@ pub fn f64_bits(f f64) u64 {
// and the result in the same bit position.
// f64_from_bits(f64_bits(x)) == x.
pub fn f64_from_bits(b u64) f64 {
p := *f64(&b)
p := &f64(&b)
return *p
}