Index: misc/cgo/test/issue8420.go |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/misc/cgo/test/issue8420.go |
@@ -0,0 +1,18 @@ |
+// Copyright 2014 The Go Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style |
+// license that can be found in the LICENSE file. |
+ |
+package cgotest |
+ |
+// Issue 8420. Cgo generated source code does not compile |
+// with -Werror=unused-variable. |
+ |
+/* |
+#cgo CFLAGS: -Werror=unused-variable |
+void test8420() {} |
+*/ |
+import "C" |
+ |
+func issue8420() { |
+ C.test8420() |
+} |