expressions: make assign_expression() take an op argument
[smatch.git] / validation / type-attribute-as.c
blob43021e49cd7731af6729bb3fb0e941f89964a94f
1 #define __user __attribute__((address_space(1)))
3 struct s {
4 int i;
5 } __user;
8 extern void use0(void *);
9 extern void use1(void __user *);
11 void main(void)
13 struct s s;
14 int i;
16 use0(&s); // KO
17 use0(&i); // OK
18 use1(&s); // OK
19 use1(&i); // KO
23 * check-name: type-attribute-as
25 * check-error-start
26 type-attribute-as.c:16:15: warning: incorrect type in argument 1 (different address spaces)
27 type-attribute-as.c:16:15: expected void *<noident>
28 type-attribute-as.c:16:15: got struct s <asn:1>*<noident>
29 type-attribute-as.c:19:15: warning: incorrect type in argument 1 (different address spaces)
30 type-attribute-as.c:19:15: expected void <asn:1>*<noident>
31 type-attribute-as.c:19:15: got int *<noident>
32 * check-error-end