mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
minor tcc fixes
This commit is contained in:
parent
4c07df6a21
commit
cd10890258
@ -47,7 +47,7 @@ fn (p mut Parser) comp_time() {
|
||||
}
|
||||
if_returns := p.returns
|
||||
p.returns = false
|
||||
p.gen('/* returns $p.returns */')
|
||||
//p.gen('/* returns $p.returns */')
|
||||
if p.tok == .dollar && p.peek() == .key_else {
|
||||
p.next()
|
||||
p.next()
|
||||
@ -57,7 +57,7 @@ fn (p mut Parser) comp_time() {
|
||||
p.genln('#endif')
|
||||
else_returns := p.returns
|
||||
p.returns = if_returns && else_returns
|
||||
p.gen('/* returns $p.returns */')
|
||||
//p.gen('/* returns $p.returns */')
|
||||
}
|
||||
}
|
||||
else if p.tok == .key_for {
|
||||
|
@ -124,7 +124,7 @@ fn (p mut Parser) fn_decl() {
|
||||
p.next()
|
||||
}
|
||||
p.returns = false
|
||||
p.gen('/* returns $p.returns */')
|
||||
//p.gen('/* returns $p.returns */')
|
||||
p.next()
|
||||
mut f := new_fn(p.mod, is_pub)
|
||||
// Method receiver
|
||||
|
@ -802,6 +802,9 @@ fn new_v(args[]string) *V {
|
||||
cflags: cflags
|
||||
ccompiler: find_c_compiler()
|
||||
}
|
||||
if pref.is_verbose || pref.is_debug {
|
||||
println('C compiler=$pref.ccompiler')
|
||||
}
|
||||
if pref.is_play {
|
||||
println('Playground')
|
||||
}
|
||||
|
@ -33,7 +33,8 @@ pub fn ptr_str(ptr voidptr) string {
|
||||
|
||||
// compare floats using C epsilon
|
||||
pub fn (a f64) eq(b f64) bool {
|
||||
return C.fabs(a - b) <= C.DBL_EPSILON
|
||||
//return C.fabs(a - b) <= C.DBL_EPSILON
|
||||
return (a - b) <= C.DBL_EPSILON
|
||||
}
|
||||
|
||||
// fn (nn i32) str() string {
|
||||
|
Loading…
Reference in New Issue
Block a user