Descriptioncmd/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.
Patch Set 1 #Patch Set 2 : diff -r c0a68bcf19ae https://code.google.com/p/go/ #
Total comments: 1
Patch Set 3 : diff -r 8e05add24c7e https://code.google.com/p/go/ #
MessagesTotal messages: 17
|