commit ba7282c77fe93ec17c42d1a3a11fbd4109d93616
parent 3e30a4a17fcd1bdaccf00bef07bdce99f285e0ef
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 28 Mar 2022 08:29:33 +0200
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.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/cmd/cc/cc1/lex.c b/src/cmd/cc/cc1/lex.c
@@ -558,6 +558,7 @@ string(void)
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;