mes.git
4 years agoRelease 0.9. v0.9
Jan Nieuwenhuizen [Wed, 26 Jul 2017 10:55:19 +0000 (12:55 +0200)]
Release 0.9.

* configure (VERSION): Bump to 0.9.

4 years agodoc: Release udpate.
Jan Nieuwenhuizen [Sun, 9 Jul 2017 16:40:12 +0000 (18:40 +0200)]
doc: Release udpate.

* HACKING: Update.
* INSTALL: Update.
* NEWS: Update.
* README: Update.
* doc/ANNOUNCE-0.9: New file.
* make.scm: Install it.
* guix.scm (mescc-tools): Bump to 0.2.

4 years agobuild: Install and installed-run fixes.
Jan Nieuwenhuizen [Wed, 26 Jul 2017 13:42:44 +0000 (15:42 +0200)]
build: Install and installed-run fixes.

* guile/mescc.scm (%datadir,%docdir,%moduledir,%version): Remove.
* scripts/mescc.mes: Likewise.
* module/language/c99/compiler.mes: Likewise.
 (%prefix): Prefer environment setting.
 (c99-input->full-ast): Remove unnecessary includes.
 Remove unnecessary defines.
* make.scm (%scm-files): Add mes/guile.scm.
 (src/mes.gcc, src/mes.mlibc-gcc, src/mes.guile):  Update  MODULEDIR,
 add -I src.
* src/mes.c (load_env): Use temporary variable for MODULEDIR concatenation.
  (bload_env): Likewise.

4 years agomescc: Tinycc support: calloc,malloc,realloc.
Jan Nieuwenhuizen [Tue, 25 Jul 2017 18:55:45 +0000 (20:55 +0200)]
mescc: Tinycc support: calloc,malloc,realloc.

* mlibc/libc-mes+tcc.c (calloc,malloc,realloc): New function.

4 years agomescc: Tinycc support: bugfix struct.array.
Jan Nieuwenhuizen [Tue, 25 Jul 2017 23:13:33 +0000 (01:13 +0200)]
mescc: Tinycc support: bugfix struct.array.

* module/language/c99/compiler.mes (struct-field): Update pointer
  info.
  (field:name,field:pointer,field:size,field:type): Rely on pointer
  info.
  (field:pointer): New function.
 (expr->accu): Use it.
* scaffold/tests/71-struct-array.c (test): Test it.

4 years agomescc: Tinycc support: bugfix struct pointer.
Jan Nieuwenhuizen [Tue, 25 Jul 2017 15:01:37 +0000 (17:01 +0200)]
mescc: Tinycc support: bugfix struct pointer.

* module/language/c99/compiler.mes (decl->info): Only set non-pointer struct to -1.
* scaffold/tests/23-pointer.c (test): Test it.

4 years agomescc: Tinycc support: more function stack space.
Jan Nieuwenhuizen [Tue, 25 Jul 2017 08:01:12 +0000 (10:01 +0200)]
mescc: Tinycc support: more function stack space.

* module/mes/as-i386.mes (function-locals): Increase local space from
  64 (16 vars) to 2*1025 + 80 (20 vars).

4 years agomescc: Tinycc support: bugfix for char **pp = *p.
Jan Nieuwenhuizen [Tue, 25 Jul 2017 09:11:26 +0000 (11:11 +0200)]
mescc: Tinycc support: bugfix for char **pp = *p.

* module/language/c99/compiler.mes (ptr-declr->pointer): Grok ***.
  (decl->info): Bugfix for char **pp = *p, cleanup.
* mlibc/libc-mes.c (getenv): Update for bugfix.
* scaffold/tests/23-pointer.c (test): Test it.

4 years agomescc: Tinycc support: execvp stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 18:33:15 +0000 (20:33 +0200)]
mescc: Tinycc support: execvp stub.

* mlibc/include/unistd.h (execvp): Declare.
* mlibc/libc-mes+tcc.c (execvp): Add stub.

4 years agomescc: Tinycc support: remove stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 18:19:49 +0000 (20:19 +0200)]
mescc: Tinycc support: remove stub.

* mlibc/include/stdio.h (remove): Declare.
* mlibc/libc-mes+tcc.c (remove): Add stub.

4 years agomescc: Tinycc support: fread stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 18:16:25 +0000 (20:16 +0200)]
mescc: Tinycc support: fread stub.

* mlibc/include/stdio.h (fread): Declare.
* mlibc/libc-mes+tcc.c (fread): Add stub.

4 years agomescc: Tinycc support: ftell stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 18:14:00 +0000 (20:14 +0200)]
mescc: Tinycc support: ftell stub.

* mlibc/include/stdio.h (ftell): Declare.
* mlibc/libc-mes+tcc.c (ftell): Add stub.

4 years agomescc: Tinycc support: fseek stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 18:11:22 +0000 (20:11 +0200)]
mescc: Tinycc support: fseek stub.

* mlibc/include/stdio.h (fseek): Declare.
* mlibc/libc-mes+tcc.c (fseek): Add stub.

4 years agomescc: Tinycc support: fopen stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 18:08:38 +0000 (20:08 +0200)]
mescc: Tinycc support: fopen stub.

* mlibc/include/stdio.h (fopen): Declare.
* mlibc/libc-mes+tcc.c (fopen): Add stub.

4 years agomescc: Tinycc support: strstr stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 17:54:32 +0000 (19:54 +0200)]
mescc: Tinycc support: strstr stub.

* mlibc/include/string.h (strstr): Declare.
* mlibc/libc-mes+tcc.c (strstr): Add stub.

4 years agomescc: Tinycc support: sscanf stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 17:31:52 +0000 (19:31 +0200)]
mescc: Tinycc support: sscanf stub.

* mlibc/include/stdio.h (sscanf): Declare.
* mlibc/libc-mes+tcc.c (sscanf): Add stub.

4 years agomescc: Tinycc support: longjmp, setjump stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 17:19:31 +0000 (19:19 +0200)]
mescc: Tinycc support: longjmp, setjump stub.

* mlibc/include/stdarg.h (longjmp, setjmp): Declare.
* mlibc/libc-mes+tcc.c (longjmp, setjmp): Add stub.

4 years agomescc: Tinycc support: function parameters.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 17:15:54 +0000 (19:15 +0200)]
mescc: Tinycc support: function parameters.

* module/language/c99/compiler.mes (.name): Handle function parameters.

4 years agomescc: Tinycc support: fflush stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 17:07:18 +0000 (19:07 +0200)]
mescc: Tinycc support: fflush stub.

* mlibc/include/stdio.h (fflush): Declare.
* mlibc/libc-mes+tcc.c (fflush): Add stub.

4 years agomescc: Tinycc support: vnsprintf stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 16:47:09 +0000 (18:47 +0200)]
mescc: Tinycc support: vnsprintf stub.

* mlibc/include/stdarg.h (vnsprintf): Declare.
* mlibc/libc-mes+tcc.c (vnsprintf): Add stub.

4 years agomescc: Tinycc support: jump 32.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 16:42:24 +0000 (18:42 +0200)]
mescc: Tinycc support: jump 32.

* module/mes/as-i386.mes (i386:jump-byte-z): Use jne32 (was: jne8).

4 years agomescc: Tinycc support: free stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 16:24:51 +0000 (18:24 +0200)]
mescc: Tinycc support: free stub.

* mlibc/include/stdlib.h (free): Declare.
* mlibc/libc-mes+tcc.c (free): Add stub.

4 years agomescc: Tinycc support: strrchr stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 16:16:21 +0000 (18:16 +0200)]
mescc: Tinycc support: strrchr stub.

* mlibc/include/string.h (strrchr): Declare.
* mlibc/libc-mes+tcc.c (strrchr): Add stub.

4 years agomescc: Tinycc support: strtoll stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 16:12:28 +0000 (18:12 +0200)]
mescc: Tinycc support: strtoll stub.

* mlibc/include/stdlib.h (strtoll): Declare.
* mlibc/libc-mes+tcc.c (strtoll): Add stub.

4 years agomescc: Tinycc support: strtoull stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 16:08:02 +0000 (18:08 +0200)]
mescc: Tinycc support: strtoull stub.

* mlibc/include/stdlib.h (strtoull): Declare.
* mlibc/libc-mes+tcc.c (strtoull): Add stub.

4 years agomescc: Tinycc support: strtol stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 15:38:25 +0000 (17:38 +0200)]
mescc: Tinycc support: strtol stub.

* mlibc/include/stdlib.h (strtol): Declare.
* mlibc/libc-mes+tcc.c (strtol): Add stub.

4 years agomescc: Tinycc support: lseek.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 15:33:33 +0000 (17:33 +0200)]
mescc: Tinycc support: lseek.

* mlibc/include/unistd.h (lseek): Declare.
* stage0/x86.M1 (SYS_lseek): New define.
* mlibc/libc-mes+tcc.c (lseek): New function.

4 years agomescc: Tinycc support: fclose stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 15:25:53 +0000 (17:25 +0200)]
mescc: Tinycc support: fclose stub.

* mlibc/include/stdio.h (fclose): Declare.
* mlibc/libc-mes+tcc.c (fclose): Add stub.

4 years agomescc: Tinycc support: fdopen stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 15:23:32 +0000 (17:23 +0200)]
mescc: Tinycc support: fdopen stub.

* mlibc/include/stdio.h (fdopen): Declare.
* mlibc/libc-mes+tcc.c (fdopen): Add stub.

4 years agomescc: Tinycc support: unlink.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 15:09:33 +0000 (17:09 +0200)]
mescc: Tinycc support: unlink.

* mlibc/include/unistd.h (unlink): Declare.
* stage0/x86.M1 (SYS_unlink): New define.
* mlibc/libc-mes+tcc.c (unlink): New function.

4 years agomescc: Tinycc support: fwrite stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 15:06:16 +0000 (17:06 +0200)]
mescc: Tinycc support: fwrite stub.

* mlibc/include/stdio.h (fwrite): Declare.
* mlibc/libc-mes+tcc.c (fwrite): Add stub.

4 years agomescc: Tinycc support: qsort stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 15:04:11 +0000 (17:04 +0200)]
mescc: Tinycc support: qsort stub.

* mlibc/include/stdlib.h (qsort): Declare.
* mlibc/libc-mes+tcc.c (qsort): Add stub.

4 years agomescc: Tinycc support: getcwd.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 11:49:17 +0000 (13:49 +0200)]
mescc: Tinycc support: getcwd.

* mlibc/include/unistd.h (getcwd): Declare.
* stage0/x86.M1 (SYS_getcwd): New define.
* mlibc/libc-mes+tcc.c (getcwd): New function.

4 years agomescc: Tinycc support: strchr stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 11:46:32 +0000 (13:46 +0200)]
mescc: Tinycc support: strchr stub.

* mlibc/include/string.h (strchr): Declare.
* mlibc/libc-mes+tcc.c (strchr): Add stub.

4 years agomescc: Tinycc support: fprintf stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 11:39:34 +0000 (13:39 +0200)]
mescc: Tinycc support: fprintf stub.

* mlibc/include/stdio.h (fprintf): Declare.
* mlibc/libc-mes+tcc.c (fprintf): Add stub.

4 years agomescc: Tinycc support: localtime stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 11:28:18 +0000 (13:28 +0200)]
mescc: Tinycc support: localtime stub.

* mlibc/include/time.h (localtime): Declare.
* mlibc/libc-mes+tcc.c (localtime): Add stub.

4 years agomescc: Tinycc support: time stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 11:25:54 +0000 (13:25 +0200)]
mescc: Tinycc support: time stub.

* mlibc/include/time.h (time): Declare.
* mlibc/libc-mes+tcc.c (time): Add stub.

4 years agomescc: Tinycc support: snprintf stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 11:23:15 +0000 (13:23 +0200)]
mescc: Tinycc support: snprintf stub.

* mlibc/include/stdio.h (snprintf): Declare.
* mlibc/libc-mes+tcc.c (snprintf): Add stub.

4 years agomescc: Tinycc support: strtoul stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 11:10:27 +0000 (13:10 +0200)]
mescc: Tinycc support: strtoul stub.

* mlibc/include/stdlib.h (strtoul): Declare.
* mlibc/libc-mes+tcc.c (strtoul): Add stub.

4 years agomescc: Tinycc support: memmove stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 10:53:51 +0000 (12:53 +0200)]
mescc: Tinycc support: memmove stub.

* mlibc/include/string.h (memcmp): Declare.
* mlibc/libc-mes+tcc.c (memcmp): Add stub.

4 years agomescc: Tinycc support: memset stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 10:57:34 +0000 (12:57 +0200)]
mescc: Tinycc support: memset stub.

* mlibc/include/string.h (memset): Declare.
* mlibc/libc-mes+tcc.c (memset): Add stub.

4 years agomescc: Tinycc support: memmove stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 10:56:56 +0000 (12:56 +0200)]
mescc: Tinycc support: memmove stub.

* mlibc/include/string.h (memmove): Declare.
* mlibc/libc-mes+tcc.c (memmove): Add stub.

4 years agomescc: Tinycc support: memcpy stub.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 10:43:04 +0000 (12:43 +0200)]
mescc: Tinycc support: memcpy stub.

* mlibc/include/string.h (memcpy): Declare.
* mlibc/libc-mes+tcc.c (memcpy): Add stub.

4 years agomescc: Tinycc support: close.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 10:21:24 +0000 (12:21 +0200)]
mescc: Tinycc support: close.

* stage0/x86.M1 (SYS_close): New define.
* mlibc/include/unistd.h (close): Declare.
* mlibc/libc-mes+tcc.c: New file.
* make.scm: Build and install it.

4 years agomescc: Tinycc support: arithmetic in initializes.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 13:22:51 +0000 (15:22 +0200)]
mescc: Tinycc support: arithmetic in initializes.

* module/language/c99/compiler.mes (p-expr->number): Handle
  bitwise-or, constants.
  (initzer-data): Refactor, use p-expr->number.

4 years agomescc: Tinycc support: multi-byte [local] offsets.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 06:36:43 +0000 (08:36 +0200)]
mescc: Tinycc support: multi-byte [local] offsets.

* stage0/x86.M1: Add 32bit variants for all 8bit instructions.
* module/mes/as-i386.mes: Use them, switch on size.

4 years agomescc: Naming fix.
Jan Nieuwenhuizen [Mon, 24 Jul 2017 20:57:21 +0000 (22:57 +0200)]
mescc: Naming fix.

* stage0/x86.M1 (je8): Rename from jne8.
* module/mes/as-i386.mes (i386:jump-byte-z): Update.

4 years agomescc: Tinycc support: remove warnings for foo (void), foo (...).
Jan Nieuwenhuizen [Sun, 23 Jul 2017 21:40:23 +0000 (23:40 +0200)]
mescc: Tinycc support: remove warnings for foo (void), foo (...).

* module/language/c99/compiler.mes (.name, .type): Expect foo (void), foo (...).

4 years agomescc: Tinycc support: multiple statements in default case.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 21:04:00 +0000 (23:04 +0200)]
mescc: Tinycc support: multiple statements in default case.

* module/language/c99/compiler.mes (clause->info): Support multiple
  statements in default case.

4 years agomescc: Tinycc support: array[<const-expr>].
Jan Nieuwenhuizen [Sun, 23 Jul 2017 19:58:34 +0000 (21:58 +0200)]
mescc: Tinycc support: array[<const-expr>].

* module/language/c99/compiler.mes (p-expr->number): New function.
  (struct-field, decl->info): Use it to support const expressions in array size.

4 years agomescc: Use "tag" for tag namespace.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 16:56:07 +0000 (18:56 +0200)]
mescc: Use "tag" for tag namespace.

* module/language/c99/compiler.mes: Use "tag" for tag namespace (WAS: "struct").
  Move enums to "tag" namespace.

4 years agomescc: Guile eval.c support: headers.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 18:42:29 +0000 (20:42 +0200)]
mescc: Guile eval.c support: headers.

* mlibc/include/signal.h (sigset_t): New type.
* mlibc/include/float.h: New file.
* mlibc/include/stddef.h: New file.
* mlibc/include/sys/select.h: New file.

4 years agomescc: Non-Guix support. Thanks rain1!
Jan Nieuwenhuizen [Sun, 23 Jul 2017 13:49:03 +0000 (15:49 +0200)]
mescc: Non-Guix support.  Thanks rain1!

* mlibc/include: Neutralize include guards before #include_next.
  Fixes compiling tinycc on Debian GNU/Linux.

4 years agomescc: Tinycc support: sizeof (struct.field).
Jan Nieuwenhuizen [Sun, 23 Jul 2017 12:18:00 +0000 (14:18 +0200)]
mescc: Tinycc support: sizeof (struct.field).

* module/language/c99/compiler.mes (expr->accu): Support sizeof (struct.field).

4 years agomescc: Tinycc support: struct.union.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 11:41:38 +0000 (13:41 +0200)]
mescc: Tinycc support: struct.union.

* module/language/c99/compiler.mes (struct-field): Add struct tag to
  struct/union types.
  (field-type, field-size, field-offset, field-field, ast-type->type):
  Ascertain struct tag with type.
* (expr->accu*): Do not add struct tag.
* scaffold/tests/75-struct-union.c: Test it.
* scaffold/tests/71-struct-array.c: Update.

4 years agomescc: Tinycc support: sizeof ("foo").
Jan Nieuwenhuizen [Sun, 23 Jul 2017 11:56:38 +0000 (13:56 +0200)]
mescc: Tinycc support: sizeof ("foo").

* module/language/c99/compiler.mes (expr->accu): Support sizeof (string).

4 years agomescc: Tinycc support: struct foo {int bar; int baz} = {0}.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 08:44:17 +0000 (10:44 +0200)]
mescc: Tinycc support: struct foo {int bar; int baz} = {0}.

* module/language/c99/compiler.mes (decl->info): struct foo {int bar; int baz} = {0}.
* scaffold/tests/72-typedef-struct-def.c (test):

4 years agomescc: Tinycc support: generalize neg.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 07:18:36 +0000 (09:18 +0200)]
mescc: Tinycc support: generalize neg.

* module/language/c99/compiler.mes (expr->accu): Generalize neg.

4 years agomescc: Tinycc support: >>=, <<=.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 06:51:42 +0000 (08:51 +0200)]
mescc: Tinycc support: >>=, <<=.

* module/language/c99/compiler.mes (expr->accu): Support >>= <<=.

4 years agomescc: Bugfix non-char* *x x[] test.
Jan Nieuwenhuizen [Sun, 23 Jul 2017 06:44:48 +0000 (08:44 +0200)]
mescc: Bugfix non-char* *x x[] test.

* module/language/c99/compiler.mes (expr->pointer): New function.
  (test-jump-label->info): Use it to fix non char* while (*x | x[i]).

4 years agomescc: Tinycc support: foo[i].bar.baz.
Jan Nieuwenhuizen [Sat, 22 Jul 2017 21:39:39 +0000 (23:39 +0200)]
mescc: Tinycc support: foo[i].bar.baz.

* module/language/c99/compiler.mes (init-declr->pointer): Use -1 for array.
 (expr->accu): Implement foo[i].bar.baz.
* scaffold/tests/72-typedef-struct-def.c (test): Test it.

4 years agomescc: Tinycc support: *global =.
Jan Nieuwenhuizen [Sat, 22 Jul 2017 08:02:53 +0000 (10:02 +0200)]
mescc: Tinycc support: *global =.

* module/language/c99/compiler.mes (base->ident-address):
  Support *global = ...
* scaffold/tests/74-multi-line-string.c: Test it.

4 years agomescc: Tinycc support: anonymous union.
Jan Nieuwenhuizen [Sat, 22 Jul 2017 18:40:41 +0000 (20:40 +0200)]
mescc: Tinycc support: anonymous union.

* module/language/c99/compiler.mes (field:name): New function.
  (decl->info): Use it.
  (struct-field): Support anonymous union.
  (field:size): Update.
  (field-field): Update.
  (field-offset): Update.

4 years agomescc: Tinycc support: declare struct tm.
Jan Nieuwenhuizen [Sat, 22 Jul 2017 07:22:11 +0000 (09:22 +0200)]
mescc: Tinycc support: declare struct tm.

* mlibc/include/time.h (struct tm): New type.

4 years agomescc: Tinycc support: ignore [ULL], UL, LL, L.
Jan Nieuwenhuizen [Fri, 21 Jul 2017 19:43:18 +0000 (21:43 +0200)]
mescc: Tinycc support: ignore [ULL], UL, LL, L.

* module/language/c99/compiler.mes (cstring->number): Drop suffix.

4 years agomescc: Tinycc support: ~, ^=.
Jan Nieuwenhuizen [Fri, 21 Jul 2017 08:39:04 +0000 (10:39 +0200)]
mescc: Tinycc support: ~, ^=.

* module/mes/as-i386.mes (i386:accu-not): New function.
  (i386:accu-negate): Rename from i386:accu-not.
* module/mes/as-i386.scm (mes): Export them.
* module/language/c99/compiler.mes (expr->accu): Support ~, ^=.
* scaffold/tests/60-math.c (test): Test it.
* stage0/x86.M1 (not____%eax): New define.

4 years agomescc: Tinycc support: struct.struct.
Jan Nieuwenhuizen [Tue, 18 Jul 2017 18:22:44 +0000 (20:22 +0200)]
mescc: Tinycc support: struct.struct.

* module/language/c99/compiler.mes (expr->accu): Support &*,
  bar.foo.i, p->foo.i, p->pf->i (*pp)->foo.i, [slightly modified] offsetof.
* scaffold/tests/72-typedef-struct-def.c (test): Test them.

4 years agomescc: Tinycc support: ***parameter.
Jan Nieuwenhuizen [Thu, 20 Jul 2017 23:02:17 +0000 (01:02 +0200)]
mescc: Tinycc support: ***parameter.

* module/language/c99/compiler.mes (.name): Support ***parameter.

4 years agomescc: Tinycc support: bitwise-or initializer.
Jan Nieuwenhuizen [Thu, 20 Jul 2017 22:21:31 +0000 (00:21 +0200)]
mescc: Tinycc support: bitwise-or initializer.

* module/language/c99/compiler.mes (initzer->value): New function.
  (initzer->data): Use it to support bitwise-or initializer.
* scaffold/tests/74-multi-line-string.c (test): Test it.

4 years agomescc: Tinycc support: char*[] in function.
Jan Nieuwenhuizen [Thu, 20 Jul 2017 22:09:18 +0000 (00:09 +0200)]
mescc: Tinycc support: char*[] in function.

* module/language/c99/compiler.mes (c99-input->full-ast): Add NULL.
  (decl->info): Support char* [] in function scope.
* scaffold/tests/71-struct-array.c (test) Test it.

4 years agomescc: Tinycc support: more list initializers.
Jan Nieuwenhuizen [Tue, 18 Jul 2017 06:04:50 +0000 (08:04 +0200)]
mescc: Tinycc support: more list initializers.

* module/language/c99/compiler.mes (init-declr->name): Handle array,
  pointer array.
  (init-declr->pointer): Likewise.
  (decl->info): Generalize list initializers, add pointer variant.
  FIXME: AST-rewriting?

4 years agomescc: Tinycc support: headers.
Jan Nieuwenhuizen [Mon, 17 Jul 2017 20:03:11 +0000 (22:03 +0200)]
mescc: Tinycc support: headers.

* mlibc/include/string.h (ssize_t): New type.
* mlibc/include/unistd.h (ssize_t): New type.

4 years agomescc: Tinycc support: sizeof struct field.
Jan Nieuwenhuizen [Mon, 17 Jul 2017 05:54:48 +0000 (07:54 +0200)]
mescc: Tinycc support: sizeof struct field.

* module/language/c99/compiler.mes (expr->accu): Sizeof struct field.
* scaffold/tests/72-typedef-struct-def.c (test): Test it.

4 years agomescc: Tinycc support: sizeof typename.
Jan Nieuwenhuizen [Mon, 17 Jul 2017 05:37:03 +0000 (07:37 +0200)]
mescc: Tinycc support: sizeof typename.

* module/language/c99/compiler.mes (expr->accu): Sizeof typename.

4 years agomescc: Tinycc support: pre/post-inc/dec more.
Jan Nieuwenhuizen [Mon, 17 Jul 2017 05:33:38 +0000 (07:33 +0200)]
mescc: Tinycc support: pre/post-inc/dec more.

* module/language/c99/compiler.mes (expr-add): New function.
  (expr->pointer): New function.
  (expr->accu): Use it to support broader pre/post-inc/dec..
* scaffold/tests/72-typedef-struct-def.c (test): Test it.

4 years agomescc: Tinycc support: comma operator.
Jan Nieuwenhuizen [Sun, 16 Jul 2017 22:29:18 +0000 (00:29 +0200)]
mescc: Tinycc support: comma operator.

* module/language/c99/compiler.mes (expr->accu): Handle comma operator.
* scaffold/tests/74-multi-line-string.c (test): Test it.

4 years agomescc: Tinycc support: assign pointer to struct field.
Jan Nieuwenhuizen [Sun, 16 Jul 2017 21:39:59 +0000 (23:39 +0200)]
mescc: Tinycc support: assign pointer to struct field.

* module/language/c99/compiler.mes (expr->accu, expr->accu*): Support
  pointer field selection.
* scaffold/tests/72-typedef-struct-def.c (test): Test it.

4 years agomescc: Tinycc support: multi-line strings.
Jan Nieuwenhuizen [Sun, 16 Jul 2017 20:59:07 +0000 (22:59 +0200)]
mescc: Tinycc support: multi-line strings.

* module/language/c99/compiler.mes (initzer->data, expr->global):
  Handle multi-line strings.
* scaffold/tests/74-multi-line-string.c: New file.
* make.scm (add-scaffold-test): Build it.

4 years agomescc: Tinycc support: union.
Jan Nieuwenhuizen [Sun, 16 Jul 2017 18:54:59 +0000 (20:54 +0200)]
mescc: Tinycc support: union.

* scaffold/tests/73-union.c: New file.
* module/language/c99/compiler.mes (union->type-entry): New
  function.
  (decl->info): Support unions.

4 years agomescc: Tinycc support: struct.
Jan Nieuwenhuizen [Sun, 16 Jul 2017 17:00:01 +0000 (19:00 +0200)]
mescc: Tinycc support: struct.

* scaffold/tests/72-typedef-struct-def.c: New file.
* module/language/c99/compiler.mes (decl->info): Struct support for tinycc.

4 years agomescc: Refactor decl.
Jan Nieuwenhuizen [Thu, 20 Jul 2017 08:05:48 +0000 (10:05 +0200)]
mescc: Refactor decl.

* module/mes/as-i386.mes (i386:mem->base, i386:nop): New functions.
* module/mes/as-i386.scm: Export them.
* module/language/c99/compiler.mes:
* stage0/x86.M1 (nop,mov____(%edx),%edx,movzbl_(%edx),%edx): New defines.
* scaffold/tests/23-pointer.c: New file.
* scaffold/tests/t.c: New file.
* make.scm: Build them.
* module/language/c99/compiler.mes (init-declr->name): Handle array.
  (init-declr->pointer): Likewise.
  (ident->accu): Simplify.
  (ident->base): Simplify.
  (ident-address->base): Typo.
  (expr->accu): Simplify.
  (decl->info): Simplify.
* mlibc/libc-mes.c (getenv): Remove superfluous statement.

4 years agomescc: Use records for Guile: <local>.
Jan Nieuwenhuizen [Sat, 15 Jul 2017 09:46:13 +0000 (11:46 +0200)]
mescc: Use records for Guile: <local>.

* module/language/c99/info.scm (<local>): New record.
* module/language/c99/compiler.mes (make-local-entry): Rename from
  make-local.  Update callers.
  (local-var?): Rename from local?. Update callers.
* module/language/c99/info.mes (make-local, local:type, local:pointer,
  local:id): Move from compiler.mes.

4 years agomescc: Use records for Guile: <global>.
Jan Nieuwenhuizen [Sat, 15 Jul 2017 09:24:14 +0000 (11:24 +0200)]
mescc: Use records for Guile: <global>.

* module/language/c99/info.scm (<global>): New record.
* module/language/c99/compiler.mes (make-global-entry): Rename from
  make-global.  Update callers.
* module/language/c99/info.mes (make-global, global:type,
  global:pointer, global:value): Move from compiler.mes.

4 years agomescc: Use records for Guile: <type>.
Jan Nieuwenhuizen [Sat, 15 Jul 2017 08:40:31 +0000 (10:40 +0200)]
mescc: Use records for Guile: <type>.

* module/language/c99/info.scm (<type>): New record.
* module/language/c99/compiler.mes (make-type-entry): Rename from
  make-type.  Update-callers.
* module/language/c99/info.mes (make-type, type:type, type:size,
  type:pointer, type:description): Move from compiler.mes.

4 years agomescc: Use records for Guile: <info>.
Jan Nieuwenhuizen [Fri, 14 Jul 2017 19:26:35 +0000 (21:26 +0200)]
mescc: Use records for Guile: <info>.

* module/language/c99/info.scm (<info>): Make immutable record.
  Update users.

4 years agomescc: Use records for Guile: preparation.
Jan Nieuwenhuizen [Fri, 14 Jul 2017 18:42:26 +0000 (20:42 +0200)]
mescc: Use records for Guile: preparation.

* module/language/c99/info.mes: New file.
* module/mes/M1.mes: Use it.
* scripts/mescc.mes: Use it.
* module/language/c99/compiler.mes: Use it.  (<info>, <types>,
  <constants>, <functions>, <globals>, <locals>, <function>, <text>,
  <break>, <continue>, make, info?, .info, .types, .constants,
  .functions, .globals, .locals, .function, .text, .break, .continue):
  Remove.
* module/language/c99/info.scm: New file.
* module/language/c99/compiler.scm: Use it.
* guile/mescc.scm: Use it.
* module/mes/M1.scm: Use it.

4 years agomescc: Refactor decl.
Jan Nieuwenhuizen [Wed, 12 Jul 2017 04:55:05 +0000 (06:55 +0200)]
mescc: Refactor decl.

* module/language/c99/compiler.mes (decl->info, ptr-declr->pointer):
  New function.
  (ast->info): Use decl->info.

4 years agoguix: Update build.
Jan Nieuwenhuizen [Thu, 20 Jul 2017 21:17:54 +0000 (23:17 +0200)]
guix: Update build.

* guix.scm (mes): Do not strip.  Fixes mes binary.

4 years agobuild: support Guix.
Jan Nieuwenhuizen [Thu, 20 Jul 2017 06:16:54 +0000 (08:16 +0200)]
build: support Guix.

* guile/guix/make.scm (link-or-cp): New function.
  (assert-link, store): Use it.

4 years agobuild: Add make install.
Jan Nieuwenhuizen [Wed, 19 Jul 2017 21:47:23 +0000 (23:47 +0200)]
build: Add make install.

* guile/guix/make.scm (method-cp, install, install-target?): New functions.
* make.scm: Use them.

4 years agobuild: Add target list.
Jan Nieuwenhuizen [Wed, 19 Jul 2017 17:53:21 +0000 (19:53 +0200)]
build: Add target list.

* GNUmakefile (%): Handle all targets.
* make.scm (main): Show and implement target list.

4 years agobuild: Ignore some files.
Jan Nieuwenhuizen [Wed, 19 Jul 2017 17:31:48 +0000 (19:31 +0200)]
build: Ignore some files.

.gitignore: Update for make.scm.

4 years agobuild: Bugfix for store.
Jan Nieuwenhuizen [Wed, 19 Jul 2017 17:11:26 +0000 (19:11 +0200)]
build: Bugfix for store.

* guile/guix/make.scm (store): Add each store file only once.

4 years agobuild: Resurrect guile-2.0. Thanks rain1!
Jan Nieuwenhuizen [Fri, 21 Jul 2017 22:29:57 +0000 (00:29 +0200)]
build: Resurrect guile-2.0.  Thanks rain1!

* module/mes/guile.scm: New file.
* module/mes/elf.scm: Include it.
* module/mes/bytevectors.scm: : Include it.
* module/mes/as.scm: Include it.
* module/mes/as-i386.scm: Include it.
* module/mes/M1.scm: Include it.
* module/language/c99/compiler.scm: Include it.
* make.scm: Update.

4 years agobuild: Non-Guix build robustifications. Thanks, rain1!
Jan Nieuwenhuizen [Wed, 19 Jul 2017 12:12:29 +0000 (14:12 +0200)]
build: Non-Guix build robustifications.  Thanks, rain1!

Fix typo in configure, gracefully switch between M0 vs M1, skip
CC32/i686-unknown-linux-gnu-gcc targets if not available, esp. for
non-Guix usage.

* configure (M1): Declare missing variable.
* make.scm (main): all-go, clean-go: New targets.
* GNUmakefile (PHONY_TARGETS): Add them.
  (.config.make): New target.
* guile/guix/make.scm (%CC32): Set to #f if not found.
  (bin.gcc): Skip if CC not set.
  (check-target?, add-target): Skip if target is not set.

4 years agobuild: Fix snarf dependencies.
Jan Nieuwenhuizen [Sat, 15 Jul 2017 12:56:19 +0000 (14:56 +0200)]
build: Fix snarf dependencies.

* guile/guix/make.scm (compile.gcc compile.mescc bin.mescc m1-asm):
  Accept and forward dependencies.
* make.scm (gcc-snarf-targets): Remove explicit defaults.

4 years agobuild: Use released M0 intead of M1.
Jan Nieuwenhuizen [Wed, 12 Jul 2017 17:41:31 +0000 (19:41 +0200)]
build: Use released M0 intead of M1.

4 years agomescc: Import tinycc test suite.
Jan Nieuwenhuizen [Sun, 9 Jul 2017 16:33:56 +0000 (18:33 +0200)]
mescc: Import tinycc test suite.

* make.scm (check-scaffold-tinycc): New target.
* guile/guix/make.scm (<target>): Add baseline field.
  (method-check): Handle baseline.
* scaffold/tinycc/00_assignment.c: New file.
* scaffold/tinycc/00_assignment.expect: New file.
* scaffold/tinycc/01_comment.c: New file.
* scaffold/tinycc/01_comment.expect: New file.
* scaffold/tinycc/02_printf.c: New file.
* scaffold/tinycc/02_printf.expect: New file.
* scaffold/tinycc/03_struct.c: New file.
* scaffold/tinycc/03_struct.expect: New file.
* scaffold/tinycc/04_for.c: New file.
* scaffold/tinycc/04_for.expect: New file.
* scaffold/tinycc/05_array.c: New file.
* scaffold/tinycc/05_array.expect: New file.
* scaffold/tinycc/06_case.c: New file.
* scaffold/tinycc/06_case.expect: New file.
* scaffold/tinycc/07_function.c: New file.
* scaffold/tinycc/07_function.expect: New file.
* scaffold/tinycc/08_while.c: New file.
* scaffold/tinycc/08_while.expect: New file.
* scaffold/tinycc/09_do_while.c: New file.
* scaffold/tinycc/09_do_while.expect: New file.
* scaffold/tinycc/10_pointer.c: New file.
* scaffold/tinycc/10_pointer.expect: New file.
* scaffold/tinycc/11_precedence.c: New file.
* scaffold/tinycc/11_precedence.expect: New file.
* scaffold/tinycc/12_hashdefine.c: New file.
* scaffold/tinycc/12_hashdefine.expect: New file.
* scaffold/tinycc/13_integer_literals.c: New file.
* scaffold/tinycc/13_integer_literals.expect: New file.
* scaffold/tinycc/14_if.c: New file.
* scaffold/tinycc/14_if.expect: New file.
* scaffold/tinycc/15_recursion.c: New file.
* scaffold/tinycc/15_recursion.expect: New file.
* scaffold/tinycc/16_nesting.c: New file.
* scaffold/tinycc/16_nesting.expect: New file.
* scaffold/tinycc/17_enum.c: New file.
* scaffold/tinycc/17_enum.expect: New file.
* scaffold/tinycc/18_include.h: New file.
* scaffold/tinycc/18_include.c: New file.
* scaffold/tinycc/18_include.expect: New file.
* scaffold/tinycc/19_pointer_arithmetic.c: New file.
* scaffold/tinycc/19_pointer_arithmetic.expect: New file.
* scaffold/tinycc/20_pointer_comparison.c: New file.
* scaffold/tinycc/20_pointer_comparison.expect: New file.
* scaffold/tinycc/21_char_array.c: New file.
* scaffold/tinycc/21_char_array.expect: New file.
* scaffold/tinycc/22_floating_point.c: New file.
* scaffold/tinycc/22_floating_point.expect: New file.
* scaffold/tinycc/23_type_coercion.c: New file.
* scaffold/tinycc/23_type_coercion.expect: New file.
* scaffold/tinycc/24_math_library.c: New file.
* scaffold/tinycc/24_math_library.expect: New file.
* scaffold/tinycc/25_quicksort.c: New file.
* scaffold/tinycc/25_quicksort.expect: New file.
* scaffold/tinycc/26_character_constants.c: New file.
* scaffold/tinycc/26_character_constants.expect: New file.
* scaffold/tinycc/27_sizeof.c: New file.
* scaffold/tinycc/27_sizeof.expect: New file.
* scaffold/tinycc/28_strings.c: New file.
* scaffold/tinycc/28_strings.expect: New file.
* scaffold/tinycc/29_array_address.c: New file.
* scaffold/tinycc/29_array_address.expect: New file.
* scaffold/tinycc/30_hanoi.c: New file.
* scaffold/tinycc/30_hanoi.expect: New file.
* scaffold/tinycc/31_args.c: New file.
* scaffold/tinycc/31_args.expect: New file.
* scaffold/tinycc/32_led.c: New file.
* scaffold/tinycc/32_led.expect: New file.
* scaffold/tinycc/33_ternary_op.c: New file.
* scaffold/tinycc/33_ternary_op.expect: New file.
* scaffold/tinycc/34_array_assignment.c: New file.
* scaffold/tinycc/34_array_assignment.expect: New file.
* scaffold/tinycc/35_sizeof.c: New file.
* scaffold/tinycc/35_sizeof.expect: New file.
* scaffold/tinycc/36_array_initialisers.c: New file.
* scaffold/tinycc/36_array_initialisers.expect: New file.
* scaffold/tinycc/37_sprintf.c: New file.
* scaffold/tinycc/37_sprintf.expect: New file.
* scaffold/tinycc/38_multiple_array_index.c: New file.
* scaffold/tinycc/38_multiple_array_index.expect: New file.
* scaffold/tinycc/39_typedef.c: New file.
* scaffold/tinycc/39_typedef.expect: New file.
* scaffold/tinycc/40_stdio.c: New file.
* scaffold/tinycc/40_stdio.expect: New file.
* scaffold/tinycc/41_hashif.c: New file.
* scaffold/tinycc/41_hashif.expect: New file.
* scaffold/tinycc/42_function_pointer.c: New file.
* scaffold/tinycc/42_function_pointer.expect: New file.
* scaffold/tinycc/43_void_param.c: New file.
* scaffold/tinycc/43_void_param.expect: New file.
* scaffold/tinycc/44_scoped_declarations.c: New file.
* scaffold/tinycc/44_scoped_declarations.expect: New file.
* scaffold/tinycc/45_empty_for.c: New file.
* scaffold/tinycc/45_empty_for.expect: New file.
* scaffold/tinycc/46_grep.c: New file.
* scaffold/tinycc/46_grep.expect: New file.
* scaffold/tinycc/47_switch_return.c: New file.
* scaffold/tinycc/47_switch_return.expect: New file.
* scaffold/tinycc/48_nested_break.c: New file.
* scaffold/tinycc/48_nested_break.expect: New file.
* scaffold/tinycc/49_bracket_evaluation.c: New file.
* scaffold/tinycc/49_bracket_evaluation.expect: New file.
* scaffold/tinycc/50_logical_second_arg.c: New file.
* scaffold/tinycc/50_logical_second_arg.expect: New file.
* scaffold/tinycc/51_static.c: New file.
* scaffold/tinycc/51_static.expect: New file.
* scaffold/tinycc/52_unnamed_enum.c: New file.
* scaffold/tinycc/52_unnamed_enum.expect: New file.
* scaffold/tinycc/54_goto.c: New file.
* scaffold/tinycc/54_goto.expect: New file.
* scaffold/tinycc/55_lshift_type.c: New file.
* scaffold/tinycc/55_lshift_type.expect: New file.
* scaffold/tinycc/56_btype_excess-1.c: New file.
* scaffold/tinycc/56_btype_excess-1.expect: New file.
* scaffold/tinycc/57_btype_excess-2.c: New file.
* scaffold/tinycc/57_btype_excess-2.expect: New file.
* scaffold/tinycc/58_function_redefinition.c: New file.
* scaffold/tinycc/58_function_redefinition.expect: New file.
* scaffold/tinycc/59_function_array.c: New file.
* scaffold/tinycc/59_function_array.expect: New file.
* scaffold/tinycc/60_enum_redefinition.c: New file.
* scaffold/tinycc/60_enum_redefinition.expect: New file.
* scaffold/tinycc/61_undefined_enum.c: New file.
* scaffold/tinycc/61_undefined_enum.expect: New file.
* scaffold/tinycc/62_enumerator_redefinition.c: New file.
* scaffold/tinycc/62_enumerator_redefinition.expect: New file.
* scaffold/tinycc/63_local_enumerator_redefinition.c: New file.
* scaffold/tinycc/63_local_enumerator_redefinition.expect: New file.
* scaffold/tinycc/64_macro_nesting.c: New file.
* scaffold/tinycc/64_macro_nesting.expect: New file.
* scaffold/tinycc/67_macro_concat.c: New file.
* scaffold/tinycc/67_macro_concat.expect: New file.
* scaffold/tinycc/70_floating_point_literals.c: New file.
* scaffold/tinycc/70_floating_point_literals.expect: New file.
* scaffold/tinycc/71_macro_empty_arg.c: New file.
* scaffold/tinycc/71_macro_empty_arg.expect: New file.
* scaffold/tinycc/72_long_long_constant.c: New file.
* scaffold/tinycc/72_long_long_constant.expect: New file.
* scaffold/tinycc/73_arm64.c: New file.
* scaffold/tinycc/73_arm64.expect: New file.
* scaffold/tinycc/74_nocode_wanted.c: New file.
* scaffold/tinycc/74_nocode_wanted.expect: New file.
* scaffold/tinycc/75_array_in_struct_init.c: New file.
* scaffold/tinycc/75_array_in_struct_init.expect: New file.
* scaffold/tinycc/76_dollars_in_identifiers.c: New file.
* scaffold/tinycc/76_dollars_in_identifiers.expect: New file.
* scaffold/tinycc/77_push_pop_macro.c: New file.
* scaffold/tinycc/77_push_pop_macro.expect: New file.
* scaffold/tinycc/78_vla_label.c: New file.
* scaffold/tinycc/78_vla_label.expect: New file.
* scaffold/tinycc/79_vla_continue.c: New file.
* scaffold/tinycc/79_vla_continue.expect: New file.
* scaffold/tinycc/80_flexarray.c: New file.
* scaffold/tinycc/80_flexarray.expect: New file.
* scaffold/tinycc/81_types.c: New file.
* scaffold/tinycc/81_types.expect: New file.
* scaffold/tinycc/82_attribs_position.c: New file.
* scaffold/tinycc/82_attribs_position.expect: New file.
* scaffold/tinycc/83_utf8_in_identifiers.c: New file.
* scaffold/tinycc/83_utf8_in_identifiers.expect: New file.
* scaffold/tinycc/84_hex-float.c: New file.
* scaffold/tinycc/84_hex-float.expect: New file.
* scaffold/tinycc/85_asm-outside-function.c: New file.
* scaffold/tinycc/85_asm-outside-function.expect: New file.
* scaffold/tinycc/86_memory-model.c: New file.
* scaffold/tinycc/86_memory-model.expect: New file.
* scaffold/tinycc/87_dead_code.c: New file.
* scaffold/tinycc/87_dead_code.expect: New file.
* scaffold/tinycc/88_codeopt.c: New file.
* scaffold/tinycc/88_codeopt.expect: New file.
* scaffold/tinycc/89_nocode_wanted.c: New file.
* scaffold/tinycc/89_nocode_wanted.expect: New file.
* scaffold/tinycc/90_struct-init.c: New file.
* scaffold/tinycc/90_struct-init.expect: New file.
* scaffold/tinycc/91_ptr_longlong_arith32.c: New file.
* scaffold/tinycc/91_ptr_longlong_arith32.expect: New file.
* scaffold/tinycc/92_enum_bitfield.c: New file.
* scaffold/tinycc/92_enum_bitfield.expect: New file.
* scaffold/tinycc/93_integer_promotion.c: New file.
* scaffold/tinycc/93_integer_promotion.expect: New file.
* scaffold/tinycc/COPYING: New file.
* scaffold/tinycc/LICENSE: New file.

include

4 years agotest: Split-up Mescc scaffold test.
Jan Nieuwenhuizen [Sun, 9 Jul 2017 07:24:07 +0000 (09:24 +0200)]
test: Split-up Mescc scaffold test.

* make.scm (check-scaffold, check-scaffold-tests): New targets.
* mlibc/include/00-test.i: New file.
* mlibc/include/30-test.i: New file.
* mlibc/mini-libc-mes.c (puts): New function.
* scaffold/tests/00-exit-0.c: : New file.
* scaffold/tests/01-return-0.c: : New file.
* scaffold/tests/02-return-1.c: : New file.
* scaffold/tests/03-call.c: : New file.
* scaffold/tests/04-call-0.c: : New file.
* scaffold/tests/05-call-1.c: : New file.
* scaffold/tests/06-call-!1.c: : New file.
* scaffold/tests/10-if-0.c: : New file.
* scaffold/tests/11-if-1.c: : New file.
* scaffold/tests/12-if-==.c: : New file.
* scaffold/tests/13-if-!=.c: : New file.
* scaffold/tests/14-if-goto.c: : New file.
* scaffold/tests/15-if-!f.c: : New file.
* scaffold/tests/16-if-t.c: : New file.
* scaffold/tests/20-while.c: : New file.
* scaffold/tests/21-char[].c: : New file.
* scaffold/tests/22-while-char[].c: : New file.
* scaffold/tests/30-strlen.c: : New file.
* scaffold/tests/31-eputs.c: : New file.
* scaffold/tests/32-compare.c: : New file.
* scaffold/tests/33-and-or.c: : New file.
* scaffold/tests/34-pre-post.c: : New file.
* scaffold/tests/35-compare-char.c: : New file.
* scaffold/tests/36-compare-arithmetic.c: : New file.
* scaffold/tests/37-compare-assign.c: : New file.
* scaffold/tests/38-compare-call.c: : New file.
* scaffold/tests/40-if-else.c: : New file.
* scaffold/tests/41-?.c: : New file.
* scaffold/tests/42-goto-label.c: : New file.
* scaffold/tests/43-for-do-while.c: : New file.
* scaffold/tests/44-switch.c: : New file.
* scaffold/tests/45-void-call.c: : New file.
* scaffold/tests/50-assert.c: : New file.
* scaffold/tests/51-strcmp.c: : New file.
* scaffold/tests/52-itoa.c: : New file.
* scaffold/tests/53-strcpy.c: : New file.
* scaffold/tests/54-argv.c: : New file.
* scaffold/tests/60-math.c: : New file.
* scaffold/tests/61-array.c: : New file.
* scaffold/tests/63-struct-cell.c: : New file.
* scaffold/tests/64-make-cell.c: : New file.
* scaffold/tests/65-read.c: : New file.
* scaffold/tests/66-struct-array.c: : New file.
* scaffold/t.c: Remove.
* scaffold/t-tcc.c: Remove.

4 years agomescc: Avoid warnings in recursve functions.
Jan Nieuwenhuizen [Sun, 9 Jul 2017 09:01:30 +0000 (11:01 +0200)]
mescc: Avoid warnings in recursve functions.

* module/language/c99/compiler.mes (expr->accu): Avoid warnings in recursve functions.