1 #define __user __attribute__((address_space(1)))
5 void ret_type(void) { } /* check-should-fail */
9 int const ret_const(void) { return 0; } /* check-should-fail */
13 void __user
*ret_as(void) { return 0; } /* check-should-fail */
17 void const *ret_mod(void) { return 0; } /* check-should-fail */
21 void arg_type(void *a
) { } /* check-should-fail */
24 void arg_const(int a
);
25 void arg_const(const int a
) { } /* OK */
29 void arg_as(void __user
*a
) { } /* check-should-fail */
33 void arg_mod(void const *a
) { } /* check-should-fail */
36 void arg_more_arg(int a
);
37 void arg_more_arg(int a
, int b
) { } /* check-should-fail */
40 void arg_less_arg(int a
, int b
);
41 void arg_less_arg(int a
) { } /* check-should-fail */
44 void arg_vararg(int a
);
45 void arg_vararg(int a
, ...) { } /* check-should-fail */
48 * check-name: function-redecl
51 function-redecl.c:5:6: error: symbol 'ret_type' redeclared with different type (originally declared at function-redecl.c:4) - different base types
52 function-redecl.c:9:11: error: symbol 'ret_const' redeclared with different type (originally declared at function-redecl.c:8) - different modifiers
53 function-redecl.c:13:13: error: symbol 'ret_as' redeclared with different type (originally declared at function-redecl.c:12) - different address spaces
54 function-redecl.c:17:12: error: symbol 'ret_mod' redeclared with different type (originally declared at function-redecl.c:16) - different modifiers
55 function-redecl.c:21:6: error: symbol 'arg_type' redeclared with different type (originally declared at function-redecl.c:20) - incompatible argument 1 (different base types)
56 function-redecl.c:29:6: error: symbol 'arg_as' redeclared with different type (originally declared at function-redecl.c:28) - incompatible argument 1 (different address spaces)
57 function-redecl.c:33:6: error: symbol 'arg_mod' redeclared with different type (originally declared at function-redecl.c:32) - incompatible argument 1 (different modifiers)
58 function-redecl.c:37:6: error: symbol 'arg_more_arg' redeclared with different type (originally declared at function-redecl.c:36) - different argument counts
59 function-redecl.c:41:6: error: symbol 'arg_less_arg' redeclared with different type (originally declared at function-redecl.c:40) - different argument counts
60 function-redecl.c:45:6: error: symbol 'arg_vararg' redeclared with different type (originally declared at function-redecl.c:44) - incompatible variadic arguments