diff options
author | Russ Cox <rsc@golang.org> | 2008-10-07 13:00:10 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2008-10-07 13:00:10 -0700 |
commit | 38498df5c591b012cbd7af2ed37d9cd4ff8f2287 (patch) | |
tree | e28f0e09fb59546ac91dd385b5c2077e287d0519 | |
parent | 742265298fb639bc5e4ae74ae0a51a8b04201657 (diff) | |
download | golang-38498df5c591b012cbd7af2ed37d9cd4ff8f2287.tar.gz |
remove support for *T as an implicit declaration of T
R=ken
OCL=16651
CL=16653
-rw-r--r-- | src/cmd/gc/dcl.c | 20 | ||||
-rw-r--r-- | src/cmd/gc/go.y | 8 |
2 files changed, 3 insertions, 25 deletions
diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c index 7776816a4..5ba740844 100644 --- a/src/cmd/gc/dcl.c +++ b/src/cmd/gc/dcl.c @@ -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; } diff --git a/src/cmd/gc/go.y b/src/cmd/gc/go.y index d0177cb9e..cdf84e8e2 100644 --- a/src/cmd/gc/go.y +++ b/src/cmd/gc/go.y @@ -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); |