source: src/tests/typedef.c @ 540b275

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 540b275 was 2e04c7b3, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

Merge branch 'master' of plg2:software/cfa/cfa-cc

  • Property mode set to 100644
File size: 747 bytes
Line 
1typedef int T;
2
3void f( void ) {
4    int T( T p ) { return 3; }
5    T( 3 );
6}
7
8struct {
9    T (T);
10} fred = { 3 };
11
12typedef int (*a)(int, char);
13a b;
14
15int g(void) {
16    double a;
17}
18a c;
19
20typedef typeof(3) x, y;  // GCC
21
22x p;
23y q;
24
25int main() {
26    typedef typeof(3) z, p;
27    z w;
28    p x;
29}
30
31// new-style function definitions
32
33typedef [10] * int arrayOf10Pointers;
34arrayOf10Pointers array;
35typedef const * int constantPointer;
36typedef * [ int ]( [] int ) funcPtr;
37typedef [ int ] funcProto( []  int );
38typedef [ int, int ] tupleType;
39typedef * [ int, int ] tupleTypePtr;
40typedef * int c, d;
41typedef [ int ] f( * int ), g;
42typedef [ * [static 10] int ] t;
43typedef [ * [static 10] int x ] h();
44
45// Local Variables: //
46// tab-width: 4 //
47// End: //
Note: See TracBrowser for help on using the repository browser.