mescc: Tinycc support: sizeof (struct.field).
* module/language/c99/compiler.mes (expr->accu): Support sizeof (struct.field).
This commit is contained in:
parent
1d996c7131
commit
2756dd9071
|
@ -526,6 +526,11 @@
|
|||
(size (field-size info type field)))
|
||||
(append-text info (wrap-as (i386:value->accu size)))))
|
||||
|
||||
((sizeof-expr (d-sel (ident ,field) (p-expr (ident ,struct))))
|
||||
(let* ((type (ident->type info struct))
|
||||
(size (field-size info type field)))
|
||||
(append-text info (wrap-as (i386:value->accu size)))))
|
||||
|
||||
((sizeof-type (type-name (decl-spec-list (type-spec (fixed-type ,name)))))
|
||||
(let* ((type name)
|
||||
(size (ast-type->size info type)))
|
||||
|
|
Loading…
Reference in a new issue