]> Cypherpunks repositories - gostls13.git/commitdiff
remove support for *T as an implicit declaration of T
authorRuss Cox <rsc@golang.org>
Tue, 7 Oct 2008 20:00:10 +0000 (13:00 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 7 Oct 2008 20:00:10 +0000 (13:00 -0700)
R=ken
OCL=16651
CL=16653

src/cmd/gc/dcl.c
src/cmd/gc/go.y

index 7776816a407a74dfeebe8d0dffd855d13f04c469..5ba74084441ebe3baa601f198e525ed6252efe45 100644 (file)
@@ -872,21 +872,6 @@ oldtype(Sym *s)
        return t;
 }
 
-Type*
-forwdcl(Sym *s)
-{
-       Type *t;
-
-       // this type has no meaning and
-       // will cause an error if referenced.
-       // it will be patched when/if the
-       // type is ever assigned.
-
-       t = typ(TFORW);
-       t = ptrto(t);
-       return t;
-}
-
 /*
  * n is a node with a name (or a reversed list of them).
  * make it an anonymous declaration of that name's type.
@@ -1120,8 +1105,9 @@ checkwidth(Type *t)
 void
 defercheckwidth(void)
 {
-       if(defercalc)
-               fatal("defercheckwidth");
+       // we get out of sync on syntax errors, so don't be pedantic.
+       // if(defercalc)
+       //      fatal("defercheckwidth");
        defercalc = 1;
 }
 
index d0177cb9ed2cc323ee71e699c14465d988a7ba61..cdf84e8e26625a9db7cad2dd80dbc3c102c2ad0b 100644 (file)
@@ -1078,14 +1078,6 @@ Bothertype:
        {
                $$ = oldtype($1);
        }
-|      '*' lname       /* TODO(rsc): yank */
-       {
-               Type *t;
-
-               t = dodcltype(newtype($2));
-               updatetype(t, typ(TFORWSTRUCT));
-               $$ = ptrto(t);
-       }
 |      '[' oexpr ']' Btype
        {
                $$ = aindex($2, $4);