source: src/tests/GccExtensions.c@ 8b52686

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay gc_noraii jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since 8b52686 was 10dc7491, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

add more tests

  • Property mode set to 100644
File size: 1.3 KB
Line 
1int main(int argc, char const *argv[]) {
2 asm( "nop" );
3 __asm( "nop" );
4 __asm__( "nop" );
5
6 __complex__ c1;
7 _Complex c2;
8
9 const int i1;
10 __const int i2;
11 __const__ int i3;
12
13 __extension__ const int ex;
14 struct S {
15 __extension__ int a, b, c;
16 };
17 int i = __extension__ 3;
18 __extension__ int a, b, c;
19 __extension__ a, __extension__ b, __extension__ c;
20 __extension__ a = __extension__ b + __extension__ c;
21 __extension__ a = __extension__ ( __extension__ b + __extension__ c );
22
23 __inline int f1() {}
24 __inline__ int f2() {}
25
26 __signed s1;
27 __signed s2;
28
29 __typeof(s1) t1;
30 __typeof__(s1) t2;
31
32 __volatile int v1;
33 __volatile__ int v2;
34
35 __attribute__(()) int a1;
36 const __attribute(()) int a2;
37 const static __attribute(()) int a3;
38 const static int __attribute(()) a4;
39 const static int a5 __attribute(());
40 const static int a6, __attribute(()) a7;
41
42 int * __attribute(()) p1;
43 int (* __attribute(()) p2);
44// int (__attribute(()) (p3));
45// int ( __attribute(()) (* __attribute(()) p4));
46
47 struct __attribute(()) s1;
48 struct __attribute(()) s2 { int i; };
49 struct __attribute(()) s3 { int i; } x1, __attribute(()) y1;
50 struct __attribute(()) s4 { int i; } x2, y2 __attribute(());
51
52 int m1 [10] __attribute(());
53 int m2 [10][10] __attribute(());
54 int __attribute(()) m3 [10][10];
55// int ( __attribute(()) m4 [10] )[10];
56
57 return 0;
58}
Note: See TracBrowser for help on using the repository browser.