1
0
mirror of https://github.com/golang/go synced 2024-10-04 04:41:23 -06:00
go/src/cmd
Shenghou Ma 040eeff71c 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
2014-07-18 02:59:54 -04:00
..
5a all: remove 'extern register M *m' from runtime 2014-06-26 11:54:39 -04:00
5c cmd/5c, cmd/5g, cmd/5l, liblink: nacl/arm support 2014-07-10 15:14:37 -04:00
5g cmd/5c, cmd/5g, cmd/5l, liblink: nacl/arm support 2014-07-10 15:14:37 -04:00
5l cmd/5c, cmd/5g, cmd/5l, liblink: nacl/arm support 2014-07-10 15:14:37 -04:00
6a liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
6c cmd/5c, cmd/6c, cmd/8c, cmd/cc: remove unused global variable retok. 2014-06-17 02:05:27 -04:00
6g build: annotations and modifications for c2go 2014-07-02 15:41:29 -04:00
6l build: annotations and modifications for c2go 2014-07-02 15:41:29 -04:00
8a liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
8c cmd/5c, cmd/6c, cmd/8c, cmd/cc: remove unused global variable retok. 2014-06-17 02:05:27 -04:00
8g build: annotations and modifications for c2go 2014-07-02 15:41:29 -04:00
8l build: annotations and modifications for c2go 2014-07-02 15:41:29 -04:00
addr2line debug/plan9obj, cmd/addr2line: on Plan 9 use a.out header 2014-07-09 12:33:13 +02:00
api runtime: convert map implementation to Go. 2014-07-16 14:16:19 -07:00
cc cmd/5c, cmd/6c, cmd/8c, cmd/cc: remove unused global variable retok. 2014-06-17 02:05:27 -04:00
cgo undo CL 109640045 / f97fb06525e5 2014-07-18 02:59:54 -04:00
dist runtime: convert map implementation to Go. 2014-07-16 14:16:19 -07:00
fix cmd/fix: remove obsolete testdata. 2013-06-02 15:40:32 +02:00
gc cmd/gc: implement 'for range x {' 2014-07-16 19:27:10 -04:00
go cmd/go/doc: Fix example domain 2014-07-16 20:48:57 +10:00
gofmt gofmt: -s flag simplifies "for _ = range x" 2014-07-17 09:40:27 -07:00
ld runtime: convert map implementation to Go. 2014-07-16 14:16:19 -07:00
link src: fix issues found by go vet std 2014-04-26 19:54:48 -07:00
nm cmd/nm: skip test on android (no Go tool) 2014-07-08 13:44:41 -04:00
objdump objdump: remove out-of-date comment 2014-07-15 06:03:36 -07:00
pack cmd/pack: skip test on android (no Go tool) 2014-07-08 13:45:06 -04:00
yacc cmd/yacc: expr example support windows 2013-12-19 12:14:07 -05:00