diff options
| author | Al Viro <viro@ftp.linux.org.uk> | 2009-02-14 12:26:05 +0000 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2009-07-17 23:06:23 +0000 |
| commit | 53c5c08934ef0f082fd1ec069e9d179b005fe2df (patch) | |
| tree | 100dde56c3ef060112bd134b65ca4b12bb86528a /validation | |
| parent | ef5501aa2a87a5f02b426ff4150048c46048d829 (diff) | |
| download | sparse-dev-53c5c08934ef0f082fd1ec069e9d179b005fe2df.tar.gz | |
Apply attributes after ( to the right place
In int f(__user int *p) __user applies to p, not to f...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/attr_in_parameter.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/validation/attr_in_parameter.c b/validation/attr_in_parameter.c new file mode 100644 index 00000000..1b104ea4 --- /dev/null +++ b/validation/attr_in_parameter.c @@ -0,0 +1,12 @@ +#define A __attribute__((address_space(1))) +static int (A *p); +static int A *q; +static void (*f)(A int *x, A int *y) = (void *)0; +static void g(int A *x) +{ + f(x, x); + p = q; +} +/* + * check-name: attribute after ( in direct-declarator + */ |
