scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 9823afcb16ede7ff099d673aa53cfd65ca889eda
parent c2d7b73b22c1a3570bfaf9b4ae70dadb5222de7c
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:
Msrc/cmd/cc/cc1/lex.c | 1+
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;