From 8dd185917603f68ffcdc3e98eb39f2497e99d563 Mon Sep 17 00:00:00 2001 From: grischka Date: Fri, 20 Nov 2015 18:25:00 +0100 Subject: [PATCH] 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: 0b3612631f49ba0c008635aaa46ecf8be2eefcf7 --- tccpp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tccpp.c b/tccpp.c index 57e1b2e..4dba954 100644 --- a/tccpp.c +++ b/tccpp.c @@ -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 = '.'; }