From 873060e7e876605eaa1b7b82f524104ee670850d Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Sat, 2 Dec 2017 19:02:17 +0700 Subject: [PATCH] emit/__emit: Do not allow to redefine the same label --- source/compiler/sc1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 3c0f282..670d455 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -6561,6 +6561,8 @@ SC_FUNC void emit_parse_line(void) error(221,st); /* label name shadows tagname */ } else { sym=fetchlab(st); + if ((sym->usage & uDEFINE)!=0) + error(021,st); /* symbol already defined */ setlabel((int)sym->addr); sym->usage|=uDEFINE; } /* if */