[hackers] [scc] Add test about double typedef || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sun, 10 Jan 2016 09:45:24 +0100 (CET)

commit 2ce22577d4ef7361895212ed8719c8ff8f36e601
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jan 10 09:36:01 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jan 10 09:36:01 2016 +0100

    Add test about double typedef
    
    This test is interesting because it has a typedef in
    the declaration of the type and in the definition of
    the type.

diff --git a/cc1/tests/test043.c b/cc1/tests/test043.c
new file mode 100644
index 0000000..d4fd1de
--- /dev/null
+++ b/cc1/tests/test043.c
_AT_@ -0,0 +1,34 @@
+/*
+name: TEST043
+description: Test for double typedef (taken from plan9 kernel)
+output:
+F4 0
+S2 Clock0link
+M6 P clock
+M8 P link
+G9 S2 cl0
+F10 I
+G11 F10 main
+{
+\
+ G9 M6 .P _AT_F4 c0
+ r #I0
+}
+*/
+
+typedef struct Clock0link Clock0link;
+typedef struct Clock0link {
+ void (*clock)(void);
+ Clock0link* link;
+} Clock0link;
+
+
+
+Clock0link cl0;
+
+int
+main(void)
+{
+ (*cl0.clock)();
+ return 0;
+}
Received on Sun Jan 10 2016 - 09:45:24 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 10 2016 - 09:48:16 CET