scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 7b107499b1940756a5cf8633c3813d1246fd6e22
parent f53a0d9b613467cdfaf87c868f25c6f79f742f56
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Fri, 10 Apr 2026 23:12:35 +0200

cc1: Use signess definitions for wchar_t

There are many cases where it can be interesting to return a
negative number, in getc() alike functions where we want to
return WEOF.

Diffstat:
Msrc/cmd/scc-cc/cc1/amd64-sysv.c | 2+-
Msrc/cmd/scc-cc/cc1/arm64-sysv.c | 2+-
Msrc/cmd/scc-cc/cc1/i386-sysv.c | 2+-
Msrc/cmd/scc-cc/cc1/riscv64-sysv.c | 2+-
Msrc/cmd/scc-cc/cc1/z80-scc.c | 6+++---
5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/cmd/scc-cc/cc1/amd64-sysv.c b/src/cmd/scc-cc/cc1/amd64-sysv.c @@ -190,7 +190,7 @@ amd64_sysv(void) }, .wchartype = { .op = INT, - .letter = L_UINT32, + .letter = L_INT32, .prop = TDEFINED | TINTEGER | TARITH | TSIGNED, .size = 4, .align = 4, diff --git a/src/cmd/scc-cc/cc1/arm64-sysv.c b/src/cmd/scc-cc/cc1/arm64-sysv.c @@ -190,7 +190,7 @@ arm64_sysv(void) }, .wchartype = { .op = INT, - .letter = L_UINT32, + .letter = L_INT32, .prop = TDEFINED | TINTEGER | TARITH | TSIGNED, .size = 4, .align = 4, diff --git a/src/cmd/scc-cc/cc1/i386-sysv.c b/src/cmd/scc-cc/cc1/i386-sysv.c @@ -197,7 +197,7 @@ i386_sysv(void) }, .wchartype = { .op = INT, - .letter = L_UINT32, + .letter = L_INT32, .prop = TDEFINED | TINTEGER | TARITH | TSIGNED, .size = 4, .align = 4, diff --git a/src/cmd/scc-cc/cc1/riscv64-sysv.c b/src/cmd/scc-cc/cc1/riscv64-sysv.c @@ -190,7 +190,7 @@ riscv64_sysv(void) }, .wchartype = { .op = INT, - .letter = L_UINT32, + .letter = L_INT32, .prop = TDEFINED | TINTEGER | TARITH | TSIGNED, .size = 4, .align = 4, diff --git a/src/cmd/scc-cc/cc1/z80-scc.c b/src/cmd/scc-cc/cc1/z80-scc.c @@ -197,11 +197,11 @@ z80_scc(void) }, .wchartype = { .op = INT, - .letter = L_UINT16, + .letter = L_INT32, .prop = TDEFINED | TINTEGER | TARITH | TSIGNED, - .size = 2, + .size = 4, .align = 1, - .n.rank = RANK_INT, + .n.rank = RANK_LONG, }, }; arch.valid_va_list = local_valid_va_list;