summaryrefslogtreecommitdiff
path: root/misc/cgo/test/empty.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/test/empty.go')
-rw-r--r--misc/cgo/test/empty.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/misc/cgo/test/empty.go b/misc/cgo/test/empty.go
new file mode 100644
index 000000000..daa748549
--- /dev/null
+++ b/misc/cgo/test/empty.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
+
+/*
+#cgo CFLAGS: -Werror=unused-variable
+void funcWithoutAnyParams() {}
+*/
+import "C"
+
+// Only test whether this can be compiled, unused
+// variable (e.g. empty gcc strut) could cause
+// warning/error under stricter CFLAGS.
+func testEmptyGccStruct() {
+ C.funcWithoutAnyParams()
+}