mescc: Tinycc support: Minimal float support.
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 18 May 2018 13:28:05 +0000 (15:28 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 18 May 2018 13:28:05 +0000 (15:28 +0200)
commitcfda148e1e5bb97486f6027de673c44aca32e571
treecb0e2714ae86ff1624014be6b3463d712ca894c5
parent7dfc88e22c63d903804274848eda12844f918c02
mescc: Tinycc support: Minimal float support.

* lib/libc+tcc.c (ldexp, strtod, strtof, strtold): New stub.
* include/math.h (ldexp): Declare.
* include/stdlib.h (strtod, strtof, strtold): Declare.
* module/mes/scm.mes (string->number): Minimal float support.
  (inexact->exact): New function.
* tests/math.test ("string->number"): Test it.
* module/language/c99/compiler.mes (ast->type): Handle float type.
  (type->info): Likewise.
  (cstring->int): Rename from cstring->number.  Update callers.
  (cstring->float): New function.
  (expr->accu): Use it.
include/math.h
include/stdlib.h
lib/libc+tcc.c
module/language/c99/compiler.mes
module/mes/scm.mes
tests/math.test