diff options
| author | grischka <grischka> | 2015-11-20 18:25:00 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2015-11-20 18:25:00 +0100 |
| commit | 8dd185917603f68ffcdc3e98eb39f2497e99d563 (patch) | |
| tree | a7ee67d17a358c7e88b28598d7fdc7e78ee2815a | |
| parent | 0b3612631f49ba0c008635aaa46ecf8be2eefcf7 (diff) | |
| download | tinycc-8dd185917603f68ffcdc3e98eb39f2497e99d563.tar.gz tinycc-8dd185917603f68ffcdc3e98eb39f2497e99d563.tar.bz2 | |
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
| -rw-r--r-- | tccpp.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 = '.'; } |
