From: Gustavo Niemeyer Date: Wed, 22 Feb 2012 19:10:25 +0000 (-0200) Subject: cgo: fix definition of opaque types X-Git-Tag: weekly.2012-02-22~19 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=024df9f6c4abbfa2ba2a753d8231f52e99ca6ebc;p=gostls13.git cgo: fix definition of opaque types Fixes #3082. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5683074 --- diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go index 342a8a530d..98a847e6fa 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -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) }