diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-03-25 16:52:46 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 20:59:47 -0700 |
| commit | ada22defe98209bfc1c4285f1b76a548552e28cf (patch) | |
| tree | 711e3c3f1c947d86df03af219b2d5c78b66ef7ab | |
| parent | 24169a3b97d724ebca6f7fe918a0b6beb3eac6b9 (diff) | |
| download | sparse-dev-ada22defe98209bfc1c4285f1b76a548552e28cf.tar.gz | |
Make the 'void' type also be part of the new world order
of types.
| -rw-r--r-- | parse.c | 2 | ||||
| -rw-r--r-- | symbol.c | 11 |
2 files changed, 3 insertions, 10 deletions
@@ -757,8 +757,6 @@ static void declare_argument(struct symbol *sym, void *data, int flags) if (sym->type == SYM_ELLIPSIS) return; - if (sym->ctype.base_type == &void_type) - return; if (!sym->ident) { warn(decl->token, "no identifier for function argument"); return; @@ -127,11 +127,6 @@ void examine_symbol_type(struct symbol * sym) base_type = sym->ctype.base_type; modifiers = sym->ctype.modifiers; - if (base_type == &void_type) { - sym->bit_size = -1; - return; - } - if (base_type == &int_type) { bit_size = BITS_IN_INT; if (modifiers & MOD_LONGLONG) { @@ -221,7 +216,7 @@ struct sym_init { { "extern", NULL, MOD_EXTERN }, /* Type specifiers */ - { "void", &void_type, 0 }, + { "void", &void_ctype, 0 }, { "char", &int_type, MOD_CHAR }, { "short", &int_type, MOD_SHORT }, { "int", &int_type, 0 }, @@ -271,8 +266,7 @@ struct sym_init { /* * Abstract types */ -struct symbol void_type, - int_type, +struct symbol int_type, fp_type, vector_type, bad_type; @@ -298,6 +292,7 @@ struct ctype_declare { struct symbol *base_type; } ctype_declaration[] = { { &bool_ctype, 0, BITS_IN_INT, MAX_INT_ALIGNMENT, &int_type }, + { &void_ctype, 0, -1, 0, &void_ctype }, { &char_ctype, MOD_SIGNED | MOD_CHAR, BITS_IN_CHAR, MAX_INT_ALIGNMENT, &int_type }, { &uchar_ctype, MOD_UNSIGNED | MOD_CHAR, BITS_IN_CHAR, MAX_INT_ALIGNMENT, &int_type }, |
