ref: ba7282c77fe93ec17c42d1a3a11fbd4109d93616
parent: 3e30a4a17fcd1bdaccf00bef07bdce99f285e0ef
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Mar 28 04:29:33 EDT 2022
cc1: Add comment about error recovery The code in string has a way to re-synchronize when a string is too long, but it was not obvious what the code was trying to do.
--- a/src/cmd/cc/cc1/lex.c
+++ b/src/cmd/cc/cc1/lex.c
@@ -558,6 +558,7 @@
c = escape();
if (bp == &yytext[STRINGSIZ+1]) {
+ /* too long, ignore everything until next quote */
for (++input->p; *input->p != '"'; ++input->p) {
if (*input->p == '\\')
++input->p;