diff options
Diffstat (limited to 'deps/sparse/validation/struct-ns2.c')
-rw-r--r-- | deps/sparse/validation/struct-ns2.c | 19 |
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 + */ |