shithub: scc

Download patch

ref: 64df849f2c1cd54a41c09c553f260ecb2c793595
parent: 7d056d042a60919bb854929e776e138e0ee2817d
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Aug 5 17:18:50 EDT 2015

Change type of mktype parameter

This parameter only receives Type ** data, so it is better
use Type ** instead of void *.

--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -289,7 +289,7 @@
 /* types.c */
 extern bool eqtype(Type *tp1, Type *tp2);
 extern Type *ctype(unsigned type, unsigned sign, unsigned size);
-extern Type *mktype(Type *tp, unsigned op, short nelem, void *data);
+extern Type *mktype(Type *tp, unsigned op, short nelem, Type *data[]);
 extern Type *duptype(Type *base);
 
 /* symbol.c */
--- a/cc1/types.c
+++ b/cc1/types.c
@@ -263,7 +263,7 @@
 }
 
 Type *
-mktype(Type *tp, unsigned op, short nelem, void *data)
+mktype(Type *tp, unsigned op, short nelem, Type *pars[])
 {
 	static Type *typetab[NR_TYPE_HASH];
 	Type **tbl, type;
@@ -284,7 +284,7 @@
 	type.type = tp;
 	type.op = op;
 	type.letter = letters[op];
-	type.pars = data;
+	type.pars = pars;
 	type.n.elem = nelem;
 	type.ns = 0;