mescc: refactor expr->accu, expr->accu*, fixes nontrivial struct by value assign.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 11 Nov 2017 12:45:53 +0000 (13:45 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 11 Nov 2017 12:45:53 +0000 (13:45 +0100)
commitdc65de59ce974e6ed0dfe54d7d436352c4c3d213
tree74f601e05d2717cd66f6cccf5a8d690d1fe9445b
parent6a16258f7814cae3aa048ea520aa8457ff35206d
mescc: refactor expr->accu, expr->accu*, fixes nontrivial struct by value assign.

* module/language/c99/compiler.mes: (pke): New function.
  (expr->number): Rename from p-expr->number.  Update callers.
  (decl->info, init-declr->pointer, struct-field): Several pointeryness fixes.
  (expr->accu*, expr->accu): Remove special-casing for foo.bar,
  foo->bar, foo[bar].  Fixes struct by value assign for non-trival
  expressions.
  (accu->ident, ident-address->accu, ident->accu):
  (base->ident-address, ident->base): Remove.
* scaffold/tests/7k-for-each-elem.c (test): Test it.
* scaffold/tests/7c-dynarray.c (test): Test it.
* scaffold/tests/7m-struct-char-array-assign.c: Test it.
* make.scm (add-scaffold-test): Build it.
make.scm
module/language/c99/compiler.mes
scaffold/tests/7c-dynarray.c
scaffold/tests/7k-for-each-elem.c
scaffold/tests/7m-struct-char-array-assign.c [new file with mode: 0644]