From 379d22b2177bec1925a5a086094f2a51153b96ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Wed, 22 May 2013 18:09:24 +0100 Subject: [PATCH] Signal an error for invalid go tags in tagbody --- experimental/compiler.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/experimental/compiler.lisp b/experimental/compiler.lisp index 11fc293..03b7499 100644 --- a/experimental/compiler.lisp +++ b/experimental/compiler.lisp @@ -612,9 +612,13 @@ (push (cons tag (current-block)) tag-blocks)))) ;; Convert the statements into the correct block. (dolist (stmt statements) - (if (go-tag-p stmt) - (set-cursor :block (cdr (assoc stmt tag-blocks))) - (ir-convert stmt)))))) + (cond + ((go-tag-p stmt) + (set-cursor :block (cdr (assoc stmt tag-blocks)))) + ((atom stmt) + (error "Invalid tag `~S'" stmt)) + (t + (ir-convert stmt))))))) (define-ir-translator go (label) (let ((tag-binding -- 1.7.10.4