1
0
mirror of https://github.com/golang/go synced 2024-09-25 03:10:12 -06:00
go/misc
Russ Cox 6be1cb8c7a cmd/cgo: fix handling of array of pointers when using clang
Clang does not record the "size" field for pointer types,
so we must insert the size ourselves. We were already
doing this, but only for the case of pointer types.
For an array of pointer types, the setting of the size for
the nested pointer type was happening after the computation
of the size of the array type, meaning that the array type
was always computed as 0 bytes. Delay the size computation.

This bug happens on all Clang systems, not just FreeBSD.
Our test checked that cgo wrote something, not that it was correct.
FreeBSD's default clang rejects array[0] as a C struct field,
so it noticed the incorrect sizes. But the sizes were incorrect
everywhere.

Update testcdefs to check the output has the right semantics.

Fixes #6292.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/22840043
2013-11-07 15:24:51 -05:00
..
arm arm: add gdb support to android launcher script 2010-07-30 10:35:07 +03:00
bash misc/bash: Completion for go tool. 2012-02-28 07:41:49 +11:00
bbedit misc/{bbedit|IntelliJIDEA|kate}: add missing delete predeclared identifier 2013-06-24 13:17:56 -07:00
cgo cmd/cgo: fix handling of array of pointers when using clang 2013-11-07 15:24:51 -05:00
chrome/gophertool gophertool: fix links 2012-10-22 01:05:21 +08:00
dashboard/codereview misc/dashboard/app, misc/dashboard/builder: delete from main repo; part of move to go.tools 2013-08-01 13:27:27 +10:00
dist misc/dist: use go.tools release branch 2013-10-23 10:34:14 +04:00
emacs undo CL 19010044 / dbcd720e5396 2013-10-29 22:17:14 -04:00
fraise misc: update type + builtin lists found in editor support files 2011-01-19 23:07:49 -05:00
git misc/git: add gofmt git pre-commit hook 2012-11-15 19:58:49 +01:00
goplay misc/goplay: use go run x.go instead of go build x.go 2013-07-12 09:41:10 +10:00
IntelliJIDEA misc/{bbedit|IntelliJIDEA|kate}: add missing delete predeclared identifier 2013-06-24 13:17:56 -07:00
kate misc/{bbedit|IntelliJIDEA|kate}: add missing delete predeclared identifier 2013-06-24 13:17:56 -07:00
linkcheck misc/linkcheck: better redirect handling, use meaningful exit code 2013-10-25 17:31:02 +03:00
notepadplus misc/notepadplus: fix some number syntax highlight issue 2013-09-23 11:35:17 +10:00
swig cmd/go: add any .c/.cc files to the SWIG shared library 2013-10-09 10:35:46 -07:00
vim misc/vim: complete packages in src directory 2013-10-11 11:30:03 +11:00
xcode misc/xcode: use xcode-select to determine path 2013-08-20 20:48:29 +10:00
zsh misc: update zsh completion 2013-04-07 04:11:12 +08:00
benchcmp misc/benchcmp: show byte allocation statistics 2012-12-22 14:51:16 -05:00
pprof misc/pprof: support block profile 2013-09-23 14:15:20 -07:00