make parser more robust against invalid declarations
[cparser] / parsetest / attributes.c
1 int test1(int a) __attribute__((noreturn));
2 int test2(int a) __attribute__((const));
3 /* empty args are allowed */
4 int test3(int a) __attribute__((weak()));
5 int test4(int a) __attribute__((unknown_error("bla", 3)));
6 int test5(int a) __attribute__((alias("test2")));
7 int test6(int a) __attribute__((section("extra")));
8 int test7(int a, const char *fmt, ...) __attribute__((format(printf,2,3)));
9
10 struct X {
11         char y;
12         int x __attribute__((aligned(4+4)));
13 };
14
15 int test2(int a) {
16         return a;
17 }
18
19 int main(void) {
20         return test5(0);
21 }