aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parse.h
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-04-26 22:45:06 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-05-21 17:27:45 +0200
commit33319e351c2874ca7c187bd96e7d986794fd2b41 (patch)
tree71ee3a0ad9fb31d392bae256839743c286ac27db /parse.h
parent177f5fe2255e2fd16040c802a7298ec21a29bd80 (diff)
downloadsparse-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.h b/parse.h
index daef2439..2cfdd872 100644
--- a/parse.h
+++ b/parse.h
@@ -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 *);