tccpp: allow .. in token stream

for gas comments lonely on a line such as

    # .. more stuff

where tcc would try to parse .. as a preprocessor directive

See also: 0b3612631f
master
grischka 2015-11-20 18:25:00 +01:00
parent 0b3612631f
commit 8dd1859176
1 changed files with 7 additions and 4 deletions

11
tccpp.c
View File

@ -2549,10 +2549,13 @@ maybe_newline:
goto parse_num;
} else if (c == '.') {
PEEKC(c, p);
if (c != '.')
expect("'.'");
PEEKC(c, p);
tok = TOK_DOTS;
if (c == '.') {
p++;
tok = TOK_DOTS;
} else {
*--p = '.'; /* may underflow into file->unget[] */
tok = '.';
}
} else {
tok = '.';
}