aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorAl Viro <viro@zeniv.linux.org.uk>2007-07-27 10:19:50 -0400
committerJosh Triplett <josh@freedesktop.org>2007-07-29 00:44:25 -0700
commitc716828bf2ba59af73f4eb058e6f131b1fb7d498 (patch)
treef6f1ddc8db72d1cbf326b530484a3e7a34cc8c04 /validation
parent321ad07c0d299690e4a7b9e9386e1acf844f8404 (diff)
downloadsparse-dev-c716828bf2ba59af73f4eb058e6f131b1fb7d498.tar.gz
[PATCH] file and global scopes are the same for purposes of struct redefining
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'validation')
-rw-r--r--validation/outer-scope.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/validation/outer-scope.c b/validation/outer-scope.c
new file mode 100644
index 00000000..2ce05051
--- /dev/null
+++ b/validation/outer-scope.c
@@ -0,0 +1,19 @@
+#ifndef FOO
+struct st { int len; };
+#define FOO
+#else
+struct st;
+static int test(struct st *s);
+static int test(struct st *s)
+{
+ return s->len;
+}
+#endif
+/*
+ * check-name: There is no scope boundary between global and file scope
+ * check-description: Used to mess scopes with -include
+ * check-command: sparse -include $file $file
+ *
+ * check-output-start
+ * check-output-end
+ */