]> git.sur5r.net Git - cc65/blobdiff - src/cc65/compile.c
Fixed two compiler warnings.
[cc65] / src / cc65 / compile.c
index bff3b95266660edbf28364a878aa4e90da76e9cc..d7167706b21de9ca4ec2e9ba05944fe201ee3c29 100644 (file)
@@ -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;
        }