Fix parsing of function declarations with redundant parentheses around the declarator...
[cparser] / parsetest / cp_error020.c
1 typedef enum {
2         TYPE_QUALIFIER_NONE     = 0,
3         TYPE_QUALIFIER_CONST    = 1 << 0,
4         TYPE_QUALIFIER_RESTRICT = 1 << 1,
5         TYPE_QUALIFIER_VOLATILE = 1 << 2,
6 } type_qualifier_t;
7
8 typedef unsigned int type_qualifiers_t;
9
10 typedef struct source_position_t source_position_t;
11 struct source_position_t {
12         const char *input_name;
13         unsigned    linenr;
14 };
15
16 typedef struct ir_type ir_type;
17
18 typedef enum {
19         TYPE_INVALID,
20         TYPE_ERROR,
21         TYPE_ATOMIC,
22 } type_kind_t;
23
24 struct type_base_t {
25         type_kind_t       kind;
26         type_qualifiers_t qualifiers;
27         source_position_t source_position;
28
29         ir_type          *firm_type;
30 };
31 typedef struct type_base_t type_base_t;
32
33 #define NULL (void*)0
34
35 int main(void)
36 {
37         static const type_base_t error = { TYPE_ERROR, TYPE_QUALIFIER_NONE, { NULL, 0 }, NULL };
38         return 0;
39 }