diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-03-27 17:48:01 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 20:59:52 -0700 |
| commit | ca9a0d503e913f4226e83c2d602eaa3ba5976361 (patch) | |
| tree | 0990051f386b52d63ce51a8fce2c2d3451888c76 | |
| parent | 3adee9e1582d330103a9276cbf17bf67d9a249fd (diff) | |
| download | sparse-dev-ca9a0d503e913f4226e83c2d602eaa3ba5976361.tar.gz | |
Fix array size problem: if the array is unsized (-1), then
the size of the array is also unsized.
| -rw-r--r-- | symbol.c | 2 | ||||
| -rw-r--r-- | symbol.h | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -123,6 +123,8 @@ static void examine_array_type(struct symbol *sym) return; examine_symbol_type(base_type); bit_size = base_type->bit_size * sym->array_size; + if (sym->array_size < 0) + bit_size = -1; alignment = base_type->alignment; if (!sym->alignment) sym->alignment = alignment; @@ -68,7 +68,7 @@ struct symbol { unsigned int bit_size; unsigned int alignment:24, bit_offset:8; - unsigned int array_size; + int array_size; struct ctype ctype; struct symbol_list *arguments; struct statement *stmt; |
