mescc: Support stdarg.
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 5 Jul 2017 16:48:08 +0000 (18:48 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 5 Jul 2017 16:48:08 +0000 (18:48 +0200)
commitebb15c72a35918492d13fd333597fdfe001a67b2
tree35a4880cbd2bed56fd411696b9dab32db00f5a8b
parentfa4fdad6232c40684993070991e6c55113799130
mescc: Support stdarg.

* mlibc/include/stdarg.h (va_list): New type.
  (va_start, va_arg, va_end, va_copy): New macro.
  (vprintf): New declaration.
* mlibc/libc-mes.c (vprintf): New function.
  (printf): Rewrite using vprintf.
* module/language/c99/compiler.mes (expr->accu, expr->accu*): Handle
  any array.  Limitation: element size must be 4/sizeof (expression).
  (make-type): Add value pointer to type.
  (type:type, type:size, type:pointer, type:description): New functions.
  (ast->info): Handle typedef with pointer.
mlibc/include/stdarg.h
mlibc/libc-mes.c
module/language/c99/compiler.mes