Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in

Issue 118890044: undo CL 114990044 / 99630144d7fc (Closed)

Can't Edit
Can't Publish+Mail
Start Review
7 years, 6 months ago by snyh
7 years, 3 months ago
minux, dfc


undo 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/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -5 lines) Patch
A misc/cgo/test/empty.go View 1 1 chunk +18 lines, -0 lines 0 comments Download
M src/cmd/cgo/gcc.go View 1 2 chunks +7 lines, -2 lines 0 comments Download
M src/cmd/cgo/out.go View 1 2 chunks +9 lines, -3 lines 0 comments Download


Total messages: 1
7 years, 6 months ago (2014-07-18 10:30:45 UTC) #1
the mainly reason of break build is realted gccErrors with clang/gcc. This
function compile some special code cuased gcc/clang failed to detect the type of

There has been a "-Wno-error" flag in Package.gccCmd, But I wonder it has
nothing useful. I haven't seen any document or code have use -Wno-error  without
an "=SpecialThings". (This may be another issuse?)

I changed the Package.gccErrors a little to handle this.

Tested under linux/amd64 with ./src/all.bash and CC=clang ./src/all.bash.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b