mescc: Tinycc support: pointer arithmetic.
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 28 Jul 2017 08:40:30 +0000 (10:40 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 28 Jul 2017 08:40:30 +0000 (10:40 +0200)
commitc7547dfd520a51cac5c1eacb3c5798b363dc7292
tree2f9eeb6ac23c146d9283be035caec101125f6e66
parentce980c82399a6f7ad0966ae666fba5c1b5c91a3f
mescc: Tinycc support: pointer arithmetic.

* module/language/c99/compiler.mes (ident->size, expr->size): New function.
  (expr->accu): Use them for ++,--,add, sub.
  (i386:type-alist): Set void size to 1.
* scaffold/tests/71-struct-array.c (test):
* scaffold/tests/76-pointer-arithmetic.c: Test it.
* make.scm (add-scaffold-test): Build it.
make.scm
module/language/c99/compiler.mes
scaffold/tests/71-struct-array.c
scaffold/tests/76-pointer-arithmetic.c [new file with mode: 0644]