Created
October 14, 2013 07:14
-
-
Save james4k/6971932 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r a10c7a350ab5 src/cmd/cgo/gcc.go | |
--- a/src/cmd/cgo/gcc.go Sat Oct 12 18:40:41 2013 -0400 | |
+++ b/src/cmd/cgo/gcc.go Mon Oct 14 02:12:48 2013 -0500 | |
@@ -306,7 +306,7 @@ | |
b.WriteString("void __cgo__f__(void) {\n") | |
b.WriteString("#line 1 \"cgo-test\"\n") | |
for i, n := range toSniff { | |
- fmt.Fprintf(&b, "%s; /* #%d */\nenum { _cgo_enum_%d = %s }; /* #%d */\n", n.C, i, i, n.C, i) | |
+ fmt.Fprintf(&b, "(%s); /* #%d */\nenum { _cgo_enum_%d = %s }; /* #%d */\n", n.C, i, i, n.C, i) | |
} | |
b.WriteString("}\n") | |
stderr := p.gccErrors(b.Bytes()) | |
@@ -343,7 +343,8 @@ | |
continue | |
case strings.Contains(line, ": useless type name in empty declaration"), | |
strings.Contains(line, ": declaration does not declare anything"), | |
- strings.Contains(line, ": unexpected type name"): | |
+ strings.Contains(line, ": unexpected type name"), | |
+ strings.Contains(line, ": expected expression"): | |
what = "type" | |
isConst[i] = false | |
case strings.Contains(line, ": statement with no effect"), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment