]> Cypherpunks repositories - gostls13.git/commit
undo CL 109640045 / f97fb06525e5
authorShenghou Ma <minux@golang.org>
Fri, 18 Jul 2014 06:59:54 +0000 (02:59 -0400)
committerShenghou Ma <minux@golang.org>
Fri, 18 Jul 2014 06:59:54 +0000 (02:59 -0400)
commit040eeff71c63451cdbc417defa8c907962577619
tree2d0abc5a7dc5bd371c17fa31ea01da0080fc1937
parent086df1dc77710cb6fa06ca561e1fafd5a4c78d8e
undo CL 109640045 / f97fb06525e5

Breaks build for FreeBSD. Probably clang related?

««« original CL description
cmd/cgo: disable inappropriate warnings when the gcc struct is empty

package main
//#cgo CFLAGS: -Wall
//void test() {}
import "C"
func main() {
    C.test()
}

This code will cause gcc issuing warnings about unused variable.

This commit use offset of the second return value of
Packages.structType to detect whether the gcc struct is empty,
and if it's directly invoke the C function instead of writing an
unused code.

LGTM=dave, minux
R=golang-codereviews, iant, minux, dave
CC=golang-codereviews
https://golang.org/cl/109640045

»»»

TBR=dfc
R=dave
CC=golang-codereviews
https://golang.org/cl/114990044
misc/cgo/test/empty.go [deleted file]
src/cmd/cgo/out.go