aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/parsing/enum-attr.c
blob: a962d8b417aff0fd7b911020e5a5c301d521ea1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#define __attr __attribute__((deprecated))

enum {
	old __attr,
	cur __attr = 42,
	new,
};

enum odd {
	odd = __attr 33,
};

enum bad {
	bad = 43 __attr,
};

/*
 * check-name: enum-attr
 *
 * check-error-start
parsing/enum-attr.c:10:15: error: typename in expression
parsing/enum-attr.c:10:15: error: undefined identifier '__attribute__'
parsing/enum-attr.c:10:15: error: bad constant expression type
parsing/enum-attr.c:10:22: error: Expected } at end of struct-union-enum-specifier
parsing/enum-attr.c:10:22: error: got 33
parsing/enum-attr.c:14:18: error: Expected } at end of struct-union-enum-specifier
parsing/enum-attr.c:14:18: error: got __attribute__
 * check-error-end
 */