]> git.sur5r.net Git - cc65/commitdiff
Removed the compiler's recovery code for illegal escaped characters.
authorGreg King <gregdk@users.sf.net>
Mon, 20 Aug 2018 21:51:22 +0000 (17:51 -0400)
committerGreg King <gregdk@users.sf.net>
Mon, 20 Aug 2018 21:51:22 +0000 (17:51 -0400)
It caused the error cascade that it was supposed to prevent.

src/cc65/scanner.c

index c9009bc2f37aee88c167084abf5b0782f9e324d7..90c0f73f6773ad483a62989176c6126cf39073cb 100644 (file)
@@ -347,16 +347,8 @@ static int ParseChar (void)
                     Error ("Octal character constant out of range");
                 break;
             default:
-                Error ("Illegal character constant");
-                C = ' ';
-                /* Try to do error recovery, otherwise the compiler will spit
-                ** out thousands of errors in this place and abort.
-                */
-                if (CurC != '\'' && CurC != '\0') {
-                    while (NextC != '\'' && NextC != '\"' && NextC != '\0') {
-                        NextChar ();
-                    }
-                }
+                Error ("Illegal escaped character");
+                C = CurC;
                 break;
         }
     } else {