]> Cypherpunks repositories - gostls13.git/commitdiff
cgo: fix definition of opaque types
authorGustavo Niemeyer <gustavo@niemeyer.net>
Wed, 22 Feb 2012 19:10:25 +0000 (17:10 -0200)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Wed, 22 Feb 2012 19:10:25 +0000 (17:10 -0200)
Fixes #3082.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5683074

src/cmd/cgo/gcc.go

index 342a8a530d143186c1908cf941b696dfc83c741e..98a847e6facbfa712e76fc3ce652801629c8f0e3 100644 (file)
@@ -1164,6 +1164,7 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
                goIdent[name.Name] = name
                switch dt.Kind {
                case "union", "class":
+                       t.Go = c.Opaque(t.Size)
                        if t.C.Empty() {
                                t.C.Set("typeof(unsigned char[%d])", t.Size)
                        }