Reviewers: golang-dev1,
Message:
Hello
golan...@googlegroups.com (cc:
golan...@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go/
Description:
cmd/cgo: makes clang happy by not using __gcc_struct__ attribute.
Please review this at
https://codereview.appspot.com/10150043/
Affected files:
M src/cmd/cgo/out.go
Index: src/cmd/cgo/out.go
===================================================================
--- a/src/cmd/cgo/out.go
+++ b/src/cmd/cgo/out.go
@@ -488,7 +488,7 @@
// Use __gcc_struct__ to work around
http://gcc.gnu.org/PR52991 on x86,
// and
http://golang.org/issue/5603.
extraAttr := ""
- if goarch == "amd64" || goarch == "386" {
+ if !strings.Contains(p.gccName(), "clang") && (goarch == "amd64" ||
goarch == "386") {
extraAttr = ", __gcc_struct__"
}
fmt.Fprintf(fgcc, "\t%s __attribute__((__packed__%v)) *a = v;\n", ctype,
extraAttr)