diff options
author | Peter Collingbourne <pcc@google.com> | 2014-08-07 09:00:02 -0400 |
---|---|---|
committer | Peter Collingbourne <pcc@google.com> | 2014-08-07 09:00:02 -0400 |
commit | 5dd6980171b6a0a37f78b06810de69ae48f8c2ad (patch) | |
tree | 7b0ab61afafb5850258461532c9d429a17527bb9 /src/cmd/cc/dcl.c | |
parent | d6be02ff9dcf63b2682870571ce2d5db61dfccec (diff) | |
download | go-5dd6980171b6a0a37f78b06810de69ae48f8c2ad.tar.gz |
cmd/cc, runtime: eliminate use of the unnamed substructure C extension
Eliminating use of this extension makes it easier to port the Go runtime
to other compilers. This CL also disables the extension in cc to prevent
accidental use.
LGTM=rsc, khr
R=rsc, aram, khr, dvyukov
CC=axwalk, golang-codereviews
https://codereview.appspot.com/106790044
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/cc/dcl.c')
-rw-r--r-- | src/cmd/cc/dcl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cmd/cc/dcl.c b/src/cmd/cc/dcl.c index a7a942686..051a6c0a7 100644 --- a/src/cmd/cc/dcl.c +++ b/src/cmd/cc/dcl.c @@ -1481,12 +1481,9 @@ edecl(int c, Type *t, Sym *s) { Type *t1; - if(s == S) { - if(!typesu[t->etype]) - diag(Z, "unnamed structure element must be struct/union"); - if(c != CXXX) - diag(Z, "unnamed structure element cannot have class"); - } else + if(s == S) + diag(Z, "unnamed structure elements not supported"); + else if(c != CXXX) diag(Z, "structure element cannot have class: %s", s->name); t1 = t; |