commit 7100226149d260a758d7056203120f86b82c24c9
parent 3e0733518d79dabdf5a49fe1ed60c88ab20db53c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 9 Feb 2023 11:03:35 +0100
cc1: Include integer suffixes in yytext
Integer suffixes were correctly parsed but not integrated in the
token string definition stored in yytext.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cmd/cc/cc1/lex.c b/src/cmd/cc/cc1/lex.c
@@ -432,6 +432,7 @@ convert:
sym->type = tp;
sym->flags |= SCONSTANT;
yylval.sym = readint(s, base, sign, sym);
+ tok2str();
return CONSTANT;
}
@@ -459,7 +460,6 @@ digits(int base)
}
end:
input->p = p;
- tok2str();
return yytext;
}