mirror of
https://github.com/golang/go
synced 2024-11-23 14:50:07 -07:00
086df1dc77
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 |
||
---|---|---|
.. | ||
android | ||
arm | ||
cgo | ||
chrome/gophertool | ||
dashboard/codereview | ||
git | ||
linkcheck | ||
makerelease | ||
nacl | ||
swig | ||
benchcmp | ||
editors | ||
pprof |