diff options
author | 2005-08-17 17:22:31 +0400 | |
---|---|---|
committer | 2005-08-17 12:58:51 -0700 | |
commit | 5240b8c7661323db17198f60b16866032c1922d2 (patch) | |
tree | 6071bba79a18e6bd0e92246107d81c349042a213 /symbol.c | |
parent | [PATCH] enum: fix sparse segfault with incomplete enum (diff) | |
download | sparse-5240b8c7661323db17198f60b16866032c1922d2.tar.gz sparse-5240b8c7661323db17198f60b16866032c1922d2.tar.bz2 sparse-5240b8c7661323db17198f60b16866032c1922d2.zip |
[PATCH] enum: improve error messages
In case of malformed enum definition:
enum E {};
the error will be reported from examine_symbol_type(),
this could be very confusing.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -323,11 +323,6 @@ static struct symbol *examine_enum_type(struct symbol *sym) { struct symbol *base_type = examine_base_type(sym); - if (base_type == &bad_ctype) { - warning(sym->pos, "invalid enum type"); - sym->bit_size = -1; - return sym; - } sym->ctype.modifiers |= (base_type->ctype.modifiers & MOD_SIGNEDNESS); sym->bit_size = bits_in_enum; if (base_type->bit_size > sym->bit_size) |