check missing or duplicate goto labels
commit64a6b4c61faa23c40a402656d044141a669965a3
authorXi Wang <xi.wang@gmail.com>
Sun, 3 Jun 2012 20:01:46 +0000 (3 16:01 -0400)
committerChristopher Li <sparse@chrisli.org>
Mon, 4 Jun 2012 23:06:33 +0000 (4 16:06 -0700)
tree21cadcc042e6cd19388fb547cfc65acb91ff5c3d
parent4c982e9d3c6827afb529c7c7ce7fbe987eac24c6
check missing or duplicate goto labels

This patch sets ->stmt of a SYM_LABEL to the corresponding label
statement.  If ->stmt was already set, it is a duplicate label.

On the other hand, if ->stmt of a goto label is not set during
evaluation, the label was never declared.

Signed-off-by: Christopher Li <sparse@chrisli.org>
evaluate.c
parse.c
validation/goto-label.c [new file with mode: 0644]