typedef volatile struct Foo FooInterm; typedef const FooInterm Foo; #ifdef ERR1 typedef struct Foo Foo; #endif typedef int ** pt; typedef int ** pt; #ifdef __CFA__ extern "C" { #endif typedef int __io_read_fn ( char buf); typedef int __io_write_fn ( const char buf); __io_read_fn read; __io_write_fn write; #ifdef __CFA__ } #endif int sz; typedef int FUNC(int, ...); typedef int FUNC(int, ...); typedef int ARR[]; typedef int ARR[]; #ifdef ERR1 // if a typedef has an array dimension, it can only be redefined to the same dimension typedef int ARR[2]; #endif typedef [ float[], char[], int[] ] ARRSa; typedef [ float[], char[], int[] ] ARRSa; #ifdef ERR1 typedef [ float[], char[2], int[] ] ARRSa; #endif typedef int ARRSb[][1][2][3]; typedef int ARRSb[][1][2][3]; #ifdef ERR1 typedef int ARRSb[][1][2][99]; #endif typedef int X; typedef int Y; typedef Y Y2; typedef X X2; typedef Y2 Z; typedef X2 Z; typedef Z X2; typedef int X2; typedef Z X2; typedef int X2; X2 value __attribute__((aligned(4 * sizeof(X2)))); __attribute__((aligned(4 * sizeof(X2)))) struct rseq_cs { int foo; }; // xxx - this doesn't work yet due to parsing problems with generic types // #ifdef __CFA__ // typedef forall(type T) void foo(T); // typedef forall(type T) void foo(T); // typedef forall(type S) void foo(S); // should be allowed to do this... // #endif int main() { typedef int ARR[sz]; // can't redefine typedef which is VLA #if ERR1 typedef int ARR[sz]; #endif Foo * x; typedef struct Bar Foo; Foo * y; typedef int *** pt; #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! }