source: src/tests/Typedef.c @ 0534c3c

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 0534c3c was 7ff30d07, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Conflicts:

Makefile.in
aclocal.m4
configure
src/Makefile.in
src/Tests/Context.c
src/driver/Makefile.in
src/examples/Makefile.in
src/examples/ctxts.c
src/examples/esskaykay.c
src/libcfa/Makefile.in

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