mescc: Tinycc support: Pointer typedefs.
This commit is contained in:
parent
b42ecbd928
commit
8cc406c9ff
|
@ -1729,6 +1729,12 @@
|
||||||
(count (expr->number info count))
|
(count (expr->number info count))
|
||||||
(type (make-c-array type count)))
|
(type (make-c-array type count)))
|
||||||
(clone info #:types (acons name type (.types info)))))
|
(clone info #:types (acons name type (.types info)))))
|
||||||
|
(((decl-spec-list (stor-spec (typedef)) (type-spec ,type)) (init-declr-list (init-declr (ptr-declr ,pointer (ident ,name)))))
|
||||||
|
(let* ((info (type->info type name info))
|
||||||
|
(type (ast->type type info))
|
||||||
|
(rank (pointer->rank pointer))
|
||||||
|
(type (rank+= type rank)))
|
||||||
|
(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)))
|
||||||
|
|
|
@ -46,6 +46,9 @@ struct here {int and;} there;
|
||||||
typedef int int_array_t[1];
|
typedef int int_array_t[1];
|
||||||
int_array_t bar;
|
int_array_t bar;
|
||||||
|
|
||||||
|
typedef struct foo *foo_pointer_t;
|
||||||
|
foo_pointer_t foep;
|
||||||
|
|
||||||
int
|
int
|
||||||
test (struct foo* p)
|
test (struct foo* p)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue