]> git.sur5r.net Git - cc65/blobdiff - src/cc65/compile.c
Fixed two compiler warnings.
[cc65] / src / cc65 / compile.c
index d0545e92b31d99f568e5507e68cc7ab2c0413fbe..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;
        }
 
@@ -397,7 +400,7 @@ void Compile (const char* FileName)
 
 
 void FinishCompile (void)
-/* Emit literals, externals, do cleanup and optimizations */
+/* Emit literals, externals, debug info, do cleanup and optimizations */
 {
     SymTable* SymTab;
     SymEntry* Func;
@@ -418,6 +421,9 @@ void FinishCompile (void)
     /* Output the literal pool */
     OutputLiteralPool ();
 
+    /* Emit debug infos if enabled */
+    EmitDebugInfo ();
+
     /* Write imported/exported symbols */
     EmitExternals ();