ref: bd49f398995ad7da3198d1a3d3309591dd23c9ee
parent: 5a887532fdcc8d14f6ee68fb647dd83725c0f43f
parent: 2fa380cca1dabdf44422e3d101c90103cc2f768a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon May 3 15:27:26 EDT 2021
Merge commit '5b35e653' into master
--- a/src/cmd/cc/cc1/amd64-sysv.c
+++ b/src/cmd/cc/cc1/amd64-sysv.c
@@ -71,7 +71,7 @@
.align = 1,
.n.rank = RANK_CHAR,
},
- .ushortype = {
+ .ushorttype = {
.op = INT,
.letter = L_UINT16,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -80,7 +80,7 @@
.n.rank = RANK_USHORT,
},
- .shortype = {
+ .shorttype = {
.op = INT,
.letter = L_INT16,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
@@ -88,7 +88,7 @@
.align = 2,
.n.rank = RANK_SHORT,
},
- .uinttype = (Type) {
+ .uinttype = {
.op = INT,
.letter = L_UINT32,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -96,7 +96,7 @@
.align = 4,
.n.rank = RANK_UINT,
},
- .inttype = (Type) {
+ .inttype = {
.op = INT,
.letter = L_INT32,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
--- a/src/cmd/cc/cc1/arch.c
+++ b/src/cmd/cc/cc1/arch.c
@@ -9,7 +9,7 @@
*uchartype, *chartype, *schartype,
*uinttype, *inttype,
*sizettype, *pdifftype,
- *ushortype, *shortype,
+ *ushorttype, *shorttype,
*longtype, *ulongtype,
*ullongtype, *llongtype,
*floattype, *doubletype, *ldoubletype,
@@ -66,8 +66,8 @@
inttype = &arch->inttype;
sizettype = &arch->sizettype;
pdifftype = &arch->pdifftype;
- ushortype = &arch->ushortype;
- shortype = &arch->shortype;
+ ushorttype = &arch->ushorttype;
+ shorttype = &arch->shorttype;
longtype = &arch->longtype;
ulongtype = &arch->ulongtype;
ullongtype = &arch->ullongtype;
--- a/src/cmd/cc/cc1/arm64-sysv.c
+++ b/src/cmd/cc/cc1/arm64-sysv.c
@@ -71,7 +71,7 @@
.align = 1,
.n.rank = RANK_CHAR,
},
- .ushortype = {
+ .ushorttype = {
.op = INT,
.letter = L_UINT16,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -80,7 +80,7 @@
.n.rank = RANK_USHORT,
},
- .shortype = {
+ .shorttype = {
.op = INT,
.letter = L_INT16,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
@@ -88,7 +88,7 @@
.align = 2,
.n.rank = RANK_SHORT,
},
- .uinttype = (Type) {
+ .uinttype = {
.op = INT,
.letter = L_UINT32,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -96,7 +96,7 @@
.align = 4,
.n.rank = RANK_UINT,
},
- .inttype = (Type) {
+ .inttype = {
.op = INT,
.letter = L_INT32,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
--- a/src/cmd/cc/cc1/builtin.c
+++ b/src/cmd/cc/cc1/builtin.c
@@ -19,7 +19,7 @@
}
if (tp == booltype ||
tp == chartype || tp == uchartype || tp == schartype ||
- tp == shortype || tp == ushortype) {
+ tp == shorttype || tp == ushorttype) {
warn("bool, char and short are promoted to int when passed through '...'");
tp = (tp->prop & TSIGNED) ? inttype : uinttype;
}
@@ -75,7 +75,7 @@
tp = last->type;
if (tp == booltype ||
tp == chartype || tp == uchartype || tp == schartype ||
- tp == shortype || tp == ushortype) {
+ tp == shorttype || tp == ushorttype) {
warn("last parameter before '...' must not be bool, char or short");
}
--- a/src/cmd/cc/cc1/cc1.h
+++ b/src/cmd/cc/cc1/cc1.h
@@ -370,8 +370,8 @@
Type schartype;
Type uchartype;
Type chartype;
- Type ushortype;
- Type shortype;
+ Type ushorttype;
+ Type shorttype;
Type uinttype;
Type inttype;
Type longtype;
@@ -530,7 +530,7 @@
*uchartype, *chartype, *schartype,
*uinttype, *inttype,
*sizettype, *pdifftype,
- *ushortype, *shortype,
+ *ushorttype, *shorttype,
*longtype, *ulongtype,
*ullongtype, *llongtype,
*floattype, *doubletype, *ldoubletype,
--- a/src/cmd/cc/cc1/expr.c
+++ b/src/cmd/cc/cc1/expr.c
@@ -348,6 +348,7 @@
}
}
errorp("incorrect arithmetic operands");
+ return lp;
}
static Node *
--- a/src/cmd/cc/cc1/i386-sysv.c
+++ b/src/cmd/cc/cc1/i386-sysv.c
@@ -71,7 +71,7 @@
.align = 1,
.n.rank = RANK_CHAR,
},
- .ushortype = {
+ .ushorttype = {
.op = INT,
.letter = L_UINT16,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -80,7 +80,7 @@
.n.rank = RANK_USHORT,
},
- .shortype = {
+ .shorttype = {
.op = INT,
.letter = L_INT16,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
@@ -88,7 +88,7 @@
.align = 2,
.n.rank = RANK_SHORT,
},
- .uinttype = (Type) {
+ .uinttype = {
.op = INT,
.letter = L_UINT32,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -96,7 +96,7 @@
.align = 4,
.n.rank = RANK_UINT,
},
- .inttype = (Type) {
+ .inttype = {
.op = INT,
.letter = L_INT32,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
--- a/src/cmd/cc/cc1/types.c
+++ b/src/cmd/cc/cc1/types.c
@@ -138,7 +138,7 @@
case 0:
return (sign == UNSIGNED) ? uinttype : inttype;
case SHORT:
- return (sign == UNSIGNED) ? ushortype : shortype;
+ return (sign == UNSIGNED) ? ushorttype : shorttype;
case LONG:
return (sign == UNSIGNED) ? ulongtype : longtype;
case LLONG:
--- a/src/cmd/cc/cc1/z80-scc.c
+++ b/src/cmd/cc/cc1/z80-scc.c
@@ -71,7 +71,7 @@
.align = 1,
.n.rank = RANK_CHAR,
},
- .ushortype = {
+ .ushorttype = {
.op = INT,
.letter = L_UINT16,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -80,7 +80,7 @@
.n.rank = RANK_USHORT,
},
- .shortype = {
+ .shorttype = {
.op = INT,
.letter = L_INT16,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
@@ -88,7 +88,7 @@
.align = 2,
.n.rank = RANK_SHORT,
},
- .uinttype = (Type) {
+ .uinttype = {
.op = INT,
.letter = L_UINT16,
.prop = TDEFINED | TINTEGER | TARITH,
@@ -96,7 +96,7 @@
.align = 1,
.n.rank = RANK_UINT,
},
- .inttype = (Type) {
+ .inttype = {
.op = INT,
.letter = L_INT16,
.prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
--- a/src/cmd/cc/posix/cc.c
+++ b/src/cmd/cc/posix/cc.c
@@ -1,5 +1,5 @@
-#define _POSIX_SOURCE
-#define _XOPEN_SOURCE 500
+#define _POSIX_SOURCE 200809L
+
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
--- a/src/libc/arch/amd64/Makefile
+++ b/src/libc/arch/amd64/Makefile
@@ -22,7 +22,9 @@
all: $(LIBC) $(SYS)
-$(LIBC): $(OBJS)
+$(LIBC): $(LIBCLST)
+
+$(LIBCLST): $(OBJS)
$(MKLST)
dep: inc-dep
--- a/src/libc/arch/arm/Makefile
+++ b/src/libc/arch/arm/Makefile
@@ -18,7 +18,9 @@
all: $(LIBC) $(SYS)
-$(LIBC): $(OBJS)
+$(LIBC): $(LIBCLST)
+
+$(LIBCLST): $(OBJS)
$(MKLST)
dep: inc-dep
--- a/src/libc/arch/arm64/Makefile
+++ b/src/libc/arch/arm64/Makefile
@@ -18,7 +18,9 @@
all: $(LIBC) $(SYS)
-$(LIBC): $(OBJS)
+$(LIBC): $(LIBCLST)
+
+$(LIBCLST): $(OBJS)
$(MKLST)
dep: inc-dep
--- a/src/libc/arch/i386/Makefile
+++ b/src/libc/arch/i386/Makefile
@@ -18,7 +18,9 @@
all: $(LIBC) $(SYS)
-$(LIBC): $(OBJS)
+$(LIBC): $(LIBCLST)
+
+$(LIBCLST): $(OBJS)
$(MKLST)
dep: inc-dep
--- a/src/libc/arch/ppc/Makefile
+++ b/src/libc/arch/ppc/Makefile
@@ -18,7 +18,9 @@
all: $(LIBC) $(SYS)
-$(LIBC): $(OBJS)
+$(LIBC): $(LIBCLST)
+
+$(LIBCLST): $(OBJS)
$(MKLST)
dep: inc-dep