[hackers] [scc] Add test for bug parsing typenames in structs || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 30 Dec 2015 22:09:44 +0100 (CET)

commit 6b79855c62dc196ceb55fc0e585f6feb27db2fda
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Dec 30 20:03:34 2015 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Dec 30 20:03:34 2015 +0100

    Add test for bug parsing typenames in structs
    
    When a struct is parsed the namespace of the lexer is
    changed to the namespace of the struct, which hides
    the definition of types, which should be visible in
    such context.

diff --git a/cc1/tests/test040.c b/cc1/tests/test040.c
new file mode 100644
index 0000000..cdd51ef
--- /dev/null
+++ b/cc1/tests/test040.c
_AT_@ -0,0 +1,13 @@
+/*
+name: TEST040
+description: Test for bug parsing typenames in struct definition
+output:
+
+*/
+
+typedef struct List List;
+struct List {
+ int len;
+ struct List *head;
+};
+
Received on Wed Dec 30 2015 - 22:09:44 CET

This archive was generated by hypermail 2.3.0 : Wed Dec 30 2015 - 22:12:11 CET