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