diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-04-26 22:45:06 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-05-21 17:27:45 +0200 |
| commit | 33319e351c2874ca7c187bd96e7d986794fd2b41 (patch) | |
| tree | 71ee3a0ad9fb31d392bae256839743c286ac27db /parse.h | |
| parent | 177f5fe2255e2fd16040c802a7298ec21a29bd80 (diff) | |
| download | sparse-dev-33319e351c2874ca7c187bd96e7d986794fd2b41.tar.gz | |
bad-goto: jumping inside a statement expression is an error
It's invalid to jump inside a statement expression.
So, detect such jumps, issue an error message and mark the
function as useless for linearization since the resulting IR
would be invalid.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'parse.h')
| -rw-r--r-- | parse.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -125,6 +125,7 @@ extern struct statement_list *function_computed_goto_list; extern struct token *parse_expression(struct token *, struct expression **); extern struct symbol *label_symbol(struct token *token); +extern void check_label_usage(struct symbol *label, struct position use_pos); extern int show_statement(struct statement *); extern void show_statement_list(struct statement_list *, const char *); |
