]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: enforce typing of 0-sized types
authorDaniel Morsing <daniel.morsing@gmail.com>
Thu, 27 Mar 2014 20:23:16 +0000 (20:23 +0000)
committerDaniel Morsing <daniel.morsing@gmail.com>
Thu, 27 Mar 2014 20:23:16 +0000 (20:23 +0000)
commit0f82cfd3f0ef84b553cd0f1e8cd578b3c29ea5d9
tree5f97c7296e641fcd1335018240be3a0de5daefc9
parent444dd26bf4c585ce71dfcd9e581865ba3047dc75
cmd/cgo: enforce typing of 0-sized types

cgo represents all 0-sized and unsized types internally as [0]byte. This means that pointers to incomplete types would be interchangable, even if given a name by typedef.

Fixes #7409.

LGTM=iant
R=golang-codereviews, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/76450043
misc/cgo/errors/err3.go [new file with mode: 0644]
misc/cgo/errors/test.bash
src/cmd/cgo/gcc.go