shithub: scc

Download patch

ref: 7e5c124a65a18e79af05d9edd4378f9fb4f05464
parent: 68337316883089a65169e2aa3f0289acc08a9627
author: Quentin Rameau <[email protected]>
date: Sun May 2 09:18:05 EDT 2021

cc1: rename (u)shortype to (u)shorttype

This aligns with the rest of the naming: $TYPEtype

--- 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,
--- 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,
--- 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/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,
--- 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,