mescc: Tinycc support: sizeof typename.

* module/language/c99/compiler.mes (expr->accu): Sizeof typename.
This commit is contained in:
Jan Nieuwenhuizen 2017-07-17 07:37:03 +02:00
parent 0fa425ed5e
commit d393785381
1 changed files with 2 additions and 3 deletions

View File

@ -526,9 +526,8 @@
(size (ast-type->size info type)))
(append-text info (wrap-as (i386:value->accu size)))))
((sizeof-type (type-name (decl-spec-list (type-spec (struct-ref (ident ,name))))))
(let* ((type (list "struct" name))
(size (ast-type->size info type)))
((sizeof-type (type-name (decl-spec-list (type-spec (typename ,type)))))
(let ((size (ast-type->size info type)))
(append-text info (wrap-as (i386:value->accu size)))))
((sizeof-type (type-name (decl-spec-list (type-spec (fixed-type ,type))) (abs-declr (pointer))))