mescc: Tinycc support: Array typedefs.
This commit is contained in:
parent
6bcc9a91e3
commit
b42ecbd928
|
@ -1722,6 +1722,13 @@
|
||||||
(let* ((info (type->info type name info))
|
(let* ((info (type->info type name info))
|
||||||
(type (ast->type type info)))
|
(type (ast->type type info)))
|
||||||
(clone info #:types (acons name type (.types info)))))
|
(clone info #:types (acons name type (.types info)))))
|
||||||
|
;; FIXME: recursive types, pointer, array
|
||||||
|
(((decl-spec-list (stor-spec (typedef)) (type-spec ,type)) (init-declr-list (init-declr (array-of (ident ,name) ,count))))
|
||||||
|
(let* ((info (type->info type name info))
|
||||||
|
(type (ast->type type info))
|
||||||
|
(count (expr->number info count))
|
||||||
|
(type (make-c-array type count)))
|
||||||
|
(clone info #:types (acons name type (.types info)))))
|
||||||
(((decl-spec-list (stor-spec (,store)) (type-spec ,type)) (init-declr-list . ,inits))
|
(((decl-spec-list (stor-spec (,store)) (type-spec ,type)) (init-declr-list . ,inits))
|
||||||
(let* ((type (ast->type type info))
|
(let* ((type (ast->type type info))
|
||||||
(function (.function info)))
|
(function (.function info)))
|
||||||
|
|
|
@ -43,6 +43,9 @@ struct anion {union {int foo; int bar;}; union {int baz; int bla;};};
|
||||||
|
|
||||||
struct here {int and;} there;
|
struct here {int and;} there;
|
||||||
|
|
||||||
|
typedef int int_array_t[1];
|
||||||
|
int_array_t bar;
|
||||||
|
|
||||||
int
|
int
|
||||||
test (struct foo* p)
|
test (struct foo* p)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue