diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-02-04 18:24:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:06:21 -0700 |
| commit | 4b369282cf9d36c1a7306d0d1571e39fa5b6bfaa (patch) | |
| tree | d7f7c6b0a040e0fdc0bc9b095bab7903104bc91b /inline.c | |
| parent | 13299c9883c735da478d6b413df99a07d5fb75a1 (diff) | |
| download | sparse-dev-4b369282cf9d36c1a7306d0d1571e39fa5b6bfaa.tar.gz | |
Add compile-time "range-check" infrastructure to sparse
Diffstat (limited to 'inline.c')
| -rw-r--r-- | inline.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -294,7 +294,7 @@ static struct statement *copy_one_statement(struct statement *stmt) switch(stmt->type) { case STMT_NONE: break; - case STMT_INTERNAL: + case STMT_CONTEXT: case STMT_EXPRESSION: { struct expression *expr = copy_expression(stmt->expression); if (expr == stmt->expression) @@ -303,6 +303,14 @@ static struct statement *copy_one_statement(struct statement *stmt) stmt->expression = expr; break; } + case STMT_RANGE: { + struct expression *expr = copy_expression(stmt->range_expression); + if (expr == stmt->expression) + break; + stmt = dup_statement(stmt); + stmt->range_expression = expr; + break; + } case STMT_COMPOUND: { struct statement *new = alloc_statement(stmt->pos, STMT_COMPOUND); copy_statement(stmt, new); |
