]> Cypherpunks repositories - gostls13.git/commitdiff
[] fixes
authorRuss Cox <rsc@golang.org>
Fri, 19 Dec 2008 05:11:56 +0000 (21:11 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 19 Dec 2008 05:11:56 +0000 (21:11 -0800)
R=ken
OCL=21565
CL=21565

src/cmd/gc/subr.c
src/cmd/gc/walk.c

index c1fbb5ae90b49e31c6ab55e6849a0d69357f78ac..a561b761a671508964a0e0be8ad53af4b0b6f6d6 100644 (file)
@@ -440,7 +440,7 @@ aindex(Node *b, Type *t)
        r = typ(TARRAY);
        r->type = t;
        r->bound = bound;
-       dowidth(r);
+       checkwidth(r);
        return r;
 }
 
index b2bea4f62ae2e54f69bf75901649c5be3e104c63..54645438a0173f6b491bd8b7919e1b4af2bb06c6 100644 (file)
@@ -1995,6 +1995,7 @@ newcompat(Node *n)
        if(t == T)
                goto bad;
 
+/*
        if(isptr[t->etype]) {
                if(t->type == T)
                        goto bad;
@@ -2012,12 +2013,13 @@ newcompat(Node *n)
                r->type = n->type;
                goto ret;
        }
+*/
 
        switch(t->etype) {
        default:
-               goto bad;
-
-       case TSTRUCT:
+//             goto bad;
+//
+//     case TSTRUCT:
                if(n->left != N)
                        yyerror("dont know what new(,e) means");
 
@@ -3510,7 +3512,7 @@ maplit(Node *n)
        tempname(var, t);
 
        a = nod(ONEW, N, N);
-       a->type = t;
+       a->type = t->type;
        a = nod(OAS, var, a);
        addtop = list(addtop, a);