diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-15 16:34:31 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-15 16:50:24 -0800 |
commit | 7fd7a12d75dd874153443d53bb158a501de067aa (patch) | |
tree | 2a504a8b7f9031ce922814584c5f6427c1607cf5 | |
parent | c0984480b6d6688d32e1023caba6a97beb3fa4e7 (diff) | |
download | cproc-7fd7a12d75dd874153443d53bb158a501de067aa.tar.xz |
Rearrange some fields in function types
-rw-r--r-- | decl.c | 10 | ||||
-rw-r--r-- | type.h | 3 |
2 files changed, 6 insertions, 7 deletions
@@ -458,9 +458,9 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs next(); func: t = mktype(TYPEFUNC, NULL); - t->func.isprototype = 0; - t->func.isvararg = 0; - t->func.isnoreturn = 0; + t->func.isprototype = false; + t->func.isvararg = false; + t->func.isnoreturn = false; t->func.params = NULL; p = &t->func.params; switch (tok.kind) { @@ -479,7 +479,7 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs } /* fallthrough */ default: - t->func.isprototype = 1; + t->func.isprototype = true; for (;;) { *p = parameter(s); p = &(*p)->next; @@ -487,7 +487,7 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs break; next(); if (tok.kind == TELLIPSIS) { - t->func.isvararg = 1; + t->func.isvararg = true; next(); break; } @@ -79,9 +79,8 @@ struct type { uint64_t length; } array; struct { - int isprototype, isvararg; + _Bool isprototype, isvararg, isnoreturn; struct parameter *params; - _Bool isnoreturn; } func; struct { char *tag; |