Descriptionundo CL 114990044 / 99630144d7fc
fix breaks build for FreeBSD.
««« original CL description
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://codereview.appspot.com/109640045
Committer: Shenghou Ma <minux@golang.org>
»»»
TBR=dfc
R=dave
CC=golang-codereviews
https://codereview.appspot.com/114990044
»»»
Patch Set 1 #Patch Set 2 : diff -r a622a4ff09da https://code.google.com/p/go/ #
MessagesTotal messages: 1
|