From: uz Date: Mon, 7 Nov 2011 21:25:20 +0000 (+0000) Subject: Disallow __asm__ on global level. X-Git-Tag: V2.13.3~161 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=49c457f518b4da6850184a236d3879ef2710779e;p=cc65 Disallow __asm__ on global level. git-svn-id: svn://svn.cc65.org/cc65/trunk@5303 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/compile.c b/src/cc65/compile.c index bff3b9526..d7167706b 100644 --- a/src/cc65/compile.c +++ b/src/cc65/compile.c @@ -91,10 +91,13 @@ static void Parse (void) continue; } - /* Check for an ASM statement (which is allowed also on global level) */ + /* Disallow ASM statements on global level */ if (CurTok.Tok == TOK_ASM) { + Error ("__asm__ is not allowed here"); + /* Parse and remove the statement for error recovery */ AsmStatement (); ConsumeSemi (); + RemoveGlobalCode (); continue; }