summaryrefslogtreecommitdiff
path: root/deps/sparse/validation/struct-ns2.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-04-09 19:55:21 +0100
committerRobert Bragg <robert@linux.intel.com>2012-04-10 18:45:04 +0100
commit8f15279ffd4340b94510ed1c3ffd4e1790283a7c (patch)
tree4c402f34162c38f88cf8206c377c06c4005b3e40 /deps/sparse/validation/struct-ns2.c
parentd6a44e5941abae8964d452c034e96b11e6a1bf35 (diff)
downloadcogl-8f15279ffd4340b94510ed1c3ffd4e1790283a7c.tar.gz
import sparse 0.4.4 snapshot
This imports a snapshot of sparse 0.4.4 under deps/sparse. The intention is that we will make some minor modifications to sparse to enable us to dump gtk-doc annotions and generate markup for function prototypes and structures in the Cogl public api to aid with api documentation and writing language bindings.
Diffstat (limited to 'deps/sparse/validation/struct-ns2.c')
-rw-r--r--deps/sparse/validation/struct-ns2.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/deps/sparse/validation/struct-ns2.c b/deps/sparse/validation/struct-ns2.c
new file mode 100644
index 00000000..4dd2c3bf
--- /dev/null
+++ b/deps/sparse/validation/struct-ns2.c
@@ -0,0 +1,19 @@
+static void
+g (struct Bar { int i; } *x)
+{
+ struct Bar y;
+ y.i = 1;
+}
+
+static void
+h (void)
+{
+ // This is not in scope and should barf loudly.
+ struct Bar y;
+ y.i = 1;
+}
+
+/*
+ * check-name: struct not in scope
+ * check-known-to-fail
+ */