1 #define __cleanup(F) __attribute__((__cleanup__(F)))
8 int var
__attribute__((cleanup(fun
))) = 1;
9 int alt
__cleanup(fun
) = 2;
10 int mis
__cleanup(0) = 3;
11 int non
__attribute__((cleanup
));
12 int mis
__attribute__((cleanup()));
13 int two
__attribute__((cleanup(fun
, fun
)));
15 for (int i
__cleanup(fun
) = 0; i
< n
; i
++)
23 * check-name: attr-cleanup
24 * check-command: sparse -Wunknown-attribute $file
27 parsing/attr-cleanup.c:10:17: error: argument is not an identifier
28 parsing/attr-cleanup.c:11:39: error: an argument is expected for attribute 'cleanup'
29 parsing/attr-cleanup.c:12:40: error: an argument is expected for attribute 'cleanup'
30 parsing/attr-cleanup.c:13:43: error: Expected ) after attribute's argument'
31 parsing/attr-cleanup.c:13:43: error: got ,