diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-15 01:39:53 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-15 19:52:18 -0800 |
commit | 8ffedb1f24804c9c13121a12b3802610f2b6f9df (patch) | |
tree | eafe054135582b264bf021e1b2d414351b023ca1 /type.h | |
parent | e477588215b222bf42d72385d9808db56e0bfce0 (diff) |
Don't embed anonymous struct members into parent
While this works nicely for structs, when unions are involved it
makes it impossible to find the next member to initialize without keeping
track of extra data per member.
Diffstat (limited to 'type.h')
-rw-r--r-- | type.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -45,6 +45,7 @@ struct member { char *name; struct type *type; uint64_t offset; + struct member *next; }; struct type { @@ -84,7 +85,7 @@ struct type { } func; struct { char *tag; - struct array members; + struct member *members; } structunion; }; }; @@ -102,7 +103,7 @@ struct type *typecommonreal(struct type *, struct type *); struct type *typeargpromote(struct type *); struct type *typeintpromote(struct type *); enum typeproperty typeprop(struct type *); -struct member *typemember(struct type *, const char *name); +struct type *typemember(struct type *, const char *, uint64_t *); struct parameter *mkparam(char *, struct type *); |