From 49c457f518b4da6850184a236d3879ef2710779e Mon Sep 17 00:00:00 2001 From: uz Date: Mon, 7 Nov 2011 21:25:20 +0000 Subject: [PATCH] Disallow __asm__ on global level. git-svn-id: svn://svn.cc65.org/cc65/trunk@5303 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/compile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.39.5