aboutsummaryrefslogtreecommitdiff
path: root/testcases
diff options
context:
space:
mode:
authorTeddy <[email protected]>2014-04-12 22:24:35 +0800
committerTeddy <[email protected]>2014-04-12 22:24:35 +0800
commitbbce3104de593c90b10778a379728f982bc3fdcb (patch)
treea7dc481f72b14dc454c60b3384d1ba11b3fdefc8 /testcases
parent85d862310c2e00361f68c317c6256b29f18eae36 (diff)
typedef now works
Diffstat (limited to 'testcases')
-rw-r--r--testcases/conflict.c4
-rw-r--r--testcases/pass.c15
2 files changed, 19 insertions, 0 deletions
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;