diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-23 15:28:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:03:18 -0700 |
commit | 780e9a96de1f2c0ef9065831699720967681468d (patch) | |
tree | df5215d738590aec319809318106fad869182d37 /show-parse.c | |
parent | For functions that lack a type, print out error rather than SIGSEGV. (diff) | |
download | sparse-780e9a96de1f2c0ef9065831699720967681468d.tar.gz sparse-780e9a96de1f2c0ef9065831699720967681468d.tar.bz2 sparse-780e9a96de1f2c0ef9065831699720967681468d.zip |
Allow 'show_position_expr()' to survive lack of type information.
Again, this allows us to continue past errors.
Diffstat (limited to 'show-parse.c')
-rw-r--r-- | show-parse.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/show-parse.c b/show-parse.c index ae45354..3f03749 100644 --- a/show-parse.c +++ b/show-parse.c @@ -915,9 +915,12 @@ static int show_position_expr(struct expression *expr, struct symbol *base) { int new = show_expression(expr->init_expr); struct symbol *ctype = expr->init_expr->ctype; + int bit_offset; + + bit_offset = ctype ? ctype->bit_offset : -1; printf("\tinsert v%d at [%d:%d] of %s\n", new, - expr->init_offset, ctype->bit_offset, + expr->init_offset, bit_offset, show_ident(base->ident)); return 0; } |