From bbce3104de593c90b10778a379728f982bc3fdcb Mon Sep 17 00:00:00 2001 From: Teddy Date: Sat, 12 Apr 2014 22:24:35 +0800 Subject: typedef now works --- testcases/conflict.c | 4 ++++ testcases/pass.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 testcases/conflict.c (limited to 'testcases') diff --git a/testcases/conflict.c b/testcases/conflict.c new file mode 100644 index 0000000..f2798e7 --- /dev/null +++ b/testcases/conflict.c @@ -0,0 +1,4 @@ +int f(int a, char b); +int f(int a); +int main() { +} diff --git a/testcases/pass.c b/testcases/pass.c index bf995ac..e567680 100644 --- a/testcases/pass.c +++ b/testcases/pass.c @@ -109,6 +109,21 @@ struct Node {int x, y;} n; int again; int again; +typedef int def; +int typedef1() { + int def; /* overrides outer typedef */ + def = 1; +} +typedef int *ptr1; +int typedef2() { + typedef int **ptr2; + { + typedef int ***ptr3; + ptr3 ptr2; + ptr3 ptr1; + } +} + int main() { n.x = 1; n.y = 2; -- cgit v1.2.3-70-g09d2